Fix unit tests to work around Jetty SOCKS bug

The Jetty HTTP client needs to be able to read the SOCKS response in a
single read call. We work around it by writing the response all at once.
Save error response body in FullJsonResponseHandler

If the server returns a non-JSON media type (which is common when an
server error occurs), the bytes of the response are available via the
new getNonJsonBytes() method. This allows seeing the error response
from the server which contain valuable information.