Fixes two problems with host handling

Hello!

There are two problems with the 'statsd_client' in the current master:

The function 'resolve_host' returns a pointer to memory which is not accessible in the caller's frame (the memory is allocated in the function, freed at the end of the function and accessed later on.) For me the effect of this was, that the UDP packet was send to random IP addresses 

The hostname parameter is not mandatory - but if it was not specified, the client cores.

The patch includes fixed for both problems.

Kind regards - Andreas