New York attorney general resigns