Limit C linkage to public symbols

Switched all internal functions to C++ linkage. This makes it harder to
accidentally call a function with a mismatched signature, and paves the
way to using C++ data structures internally.

This is the current list of symbols expoted by libnetd_resolv.so:
  _resolv_delete_cache_for_net
  _resolv_flush_cache_for_net
  _resolv_set_nameservers_for_net
  android_getaddrinfofornet
  android_getaddrinfofornetcontext
  android_gethostbyaddrfornet
  android_gethostbyaddrfornetcontext
  android_gethostbynamefornet
  android_gethostbynamefornetcontext
  android_net_res_stats_aggregate
  android_net_res_stats_get_info_for_net
  android_net_res_stats_get_usable_servers

A mass-renaming pass would improve consistency. Perhaps we could use
the prefix "netd_resolv_", or just "resolv_" for brevity. Once we begin
shipping netd binaries using this interface, we might have to live with
it for some time.

Test: atest netd_integration_test (after flashing with new netd binary)
Change-Id: I52f32add73fd908ad4a715ef8f8aff1f8d9733d0
8 files changed