Remove thread-local variable h_errno in gethostby{name, addr} 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: Ie9da1a6b18525967f0e8fe3d54b0df18e37d2b0e
5 files changed