NSW premier survives no confidence vote