Some small fixes to dns-tcp-socks-proxy

I found some issues in the dns_proxy software. I think these changes would make it better. Especially  commit 8c03e111a1ed56808dbd1a15ba8c407ca63bad1f to handle negative return values from recvfrom() makes the application behave much better.