Remove thread-local variable h_errno in getaddrinfo related APIs

Using a thread-local variable to return an int to the caller is a hack and
adds a lot of complexity. Return error code with an int pointer instead.

Test: built, flashed, booted
      system/netd/tests/runtests.sh pass

Change-Id: Idd11da334f78ba04be72566764351d328866385a
1 file changed