Use an event handler to dispatch log events

Use an event handler to receive and dispatch log events to
any handler that are registered. This allows for more multiple
handlers to be used simultaneously and allows them to be dynamically
added and removed from the application.
Refactor options processing in webmachine_mochiweb module

Refactor how options are process in the start function of the
webmachine_mochiweb module. Also add another option,
resource_module_option, to allow an option from the module options
list to override the default value for resource_module in the request
metadata.