Force AF_INET when resolving addresses

 * The default is to use IPv6 addresses, but these don't quite work yet
in Haiku.
 * Also, some debug messages improvements and fix a crash when the
	payload has % inside it (parsing it as a printf string isn't such a
	good idea)