Added base class for message handlers

All message handlers must inherit `HandlerBase`.
Users should put custom handlers in `custom_handlers.py`.