Switch NetworkInterface to one getifaddrs call.

Based on yikong@ changeset 70da41603ee0dc5ab547c778003b3ed03ce3e6a1

Refactored the enumInterfaces to enumerate all network interfaces
using getigaddrs, and gather their associated network addresses and
their hw address.

The OpenJDK implementation is incorrect since it does not return all
the interfaces on the machine, rather only interfaces with either IPv4
or IPv6 addresses associated with them. This fix restores the libcore
behaviour.

Removed solaris, BSD and non-IPv6 related code.

Bug: 26238832
Change-Id: I4bb0a7be99ccdcb2aa0f1b90bc854f8be60776ab
3 files changed