Implemented the hook system for the ErrorHandler class.

Any class can now register a callback for any hook in the ErrorHandler class.

Updated README.