Rework Webmachine error logging to use the built-in log handler

Rework error logging to be more flexible. This changes the default
error logging behavior from using the Erlang error_logger to using an
event-based system that allows for more customization and flexibility
for users.
Merge branch 'klm-error-logging-revamp'