Add support for SOCKS proxying.

Useful together with OpenSSH -D option.
Add missing includes for time_t and pid_t.
Add -Y option for setting the SOCKS proxy address.
Fix warning about potentially insecure format string.
More graceful handling of connection failures.

Avoid segfault on NULL pointer if connection fails.
Add missing (void) in function definitions.
Document socks proxy configuration.
Merge pull request #84 from martinh/socks-proxy

Socks proxy support