A judge ruled to preserve the toll, ending, for now, a dispute that has become emblematic of New York’s resistance to federal intervention in local affairs.