A historic NSW by-election result turns a new chapter in Australian politics, after One Nation swooped to victory to win its first lower house seat.