Efforts deployed by American diplomats and intelligence officials to give Hamas a political role have ended in failure.