netd: Support wildcards in cached hosts file

If an exact name is not found in the hosts file and the host name
contains at least one dot, search for entries of the form "*.domain",
where domain is the portion of the host name after the first dot.  If
that is not found, repeat using the domain.

Example: would search for the following in turn:

Note: this change is the analogue of the bionic change of the same name.
Both should be kept in sync.

Change-Id: I4b0bb81699151d5b371850daebf785e35ec9b170
1 file changed