Add hook for customizing exceptions

The exceptions can be customized via a new ErrorHandler class, which is
responsible for returning customized exceptions during synchronous
requests.
Forbid returning null from error handler.

A bunch of code style and test clean-up as well.
Code style cleanup.
Be null.
add SAXConverter for XML deserialization
issue #193: add sample xml app which also uses signature auth