Polls have closed in Farrer in NSW in a byelection being watched as a temperature check of voter dissatisfaction with major parties.