Fix NetworkInterface cannot discover down links

by refractoring to use getifaddrs to enumerate all network interfaces
and their associated network addresses.

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.

Note: The patch only fixes the Linux target.

Bug: 26238832
Change-Id: Ia5b2145199a0b1f46b9252f6466e07b104148bf8
1 file changed