Merged duplicated logic into the SocketAddress class. Based
on parallel work by @mkaleppanen and @kjbracey-arm.
Also added small ipv6 parsing fix by @mikaleppanen
For performing DNS resolution explicitly through the network-socket
user API.
This interface does not require implementation changes and can rely
entirely on the dns query library in the network-socket API.
Expression needed to init to zero a simple POD struct
Before (valid in C99/C++11/G++): (nsapi_addr_t){}
After (valid in C++03, invalid in C): nsapi_addr_t()