When dns_get_addr_info() returns an error it does not call the
resolve callback, and thus the semaphore will not be given.
This fix will avoid a deadlock situation for various errors.
Added some small tests for getaddrinfo().
Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>