ServiceStack/ServiceStack — pull request #860 by jamesgroat (2013-11-18 23:40:59+00:00)
Title: Fix ErrorResponse/ResponseStatus parsing for ProtocolBuffers

ServiceStack client doesn't correctly read or parse the ErrorResponse when using protocol buffers and the response type does not either implement IHasResponseStatus or have a ResponseStatus property. When the response type isn't IHasResponseStatus the server creates an ErrorResponse and sends it down. When using protocolbuffers the responsebody isn't readable by the TypeSerializer from within WebServiceException. Since the client has access to the stream deserializer and the WebServiceException doesn't, I attempt to deserialize within the client (in WebRequestUtils).

1. Attempt to deserialize the ResponseBody into an ErrorResponse object using the current Deserializer to properly read ErrorResponse when content type is not JSV compliant.
2. DRY creating WebServiceException between ServiceClientBase and AsyncServiceClient -> move to WebRequestUtils.
3. If response type (TResponse) is HttpWebResponse do not try to deserialize HttpWebResponse from the httpWebResponse object we already have, rather just return it.

Also fixed incorrect check to see if response type is IHasResponseStatus.