Exceptions hierarchy reworked

- common ancestor for all our exceptions, not just InvalidRequest;
- add machine-readable 'error-type' resource to some response
  objects to make it easier for client to distinguish error types;
- add 'reason' element to response some objects to give client
  more information about error;
- separate illegal elements from illegal arguments;
- use object-oriented techniques to get response object, which
  simplifies error handling.


Change-Id: I76b34327516516a1c723a09736886e9bf3166fc0