Use std::vector to store domains of nameservers and minor change

1.
Drop the old C style used to store domains.
Previously, resolv is limited to use 6 search domains with total 255 length.
(including zero padding)
After this change, the length of each domain could exactly be at most 255. (rfc 1035)
Also, invalid or duplicate domains will be dropped.

2. rename resolv_set_nameservers_for_net to resolv_set_nameservers

Bug: 135506574
Test: cd system/netd && atest
Change-Id: I94129ea521522c817d087332a7b467f616cc4895
9 files changed