Fix: change socks5_send_ptr_request to use address type

inet_ntop returns a pointer to the destination
string, so an IPv6 address would always be
converted as if it were an IPv4 address (AF_INET).

Add the address family as a third parameter to
socks5_send_ptr_request to reliably determine the
address type to request. The order of parameters
to socks5_send_ptr_request has also been changed.
Test: add socks5 tests

Introduce function pointers for send_data and
recv_data so they can be replaced for testing.