Fix: httpSpecialClientSideHandler always returns 502

httpSpecialClientSideHandler always returns a "502 Incomplete client request",
even when the request is complete.

This is part of a patch to fix the local interface, as detailed here :-
http://article.gmane.org/gmane.comp.web.polipo.user/3006
Adds an authentication method for socks version 5. more specifically RFC1929

  + Non-author changes to origial patch:

  * Trailing whitespace deleted.
Assert request->fd is still valid to avoid crash with SIGPIPE