Mark Latham on track to win seat for One Nation in NSW upper house