Sam Querrey advances to New York Open final