New York judge rules on disputed mail-in ballots to settle House race after six weeks