Allow subclasses to customize error handling

This allows a collection to add semantic error handling which is specific to the API. For example, when a requested entity is not found, an API may return a 404 error with a specific message in the response content. Not all 404's are created equally, however: the API may also return a 404 if the endpoint doesn't exist. So rather than expect the caller to parse and handle the HTTP error object, it's useful to give the collection a chance to do so – and to return a more meaningful error object.

This also allows the collection to log failed requests centrally.
Merge pull request #10 from paulmelnikow/create_error_object

Allow subclasses to customize error handling