Added dispatching of all events (closes #6)

- Minor changes to state.py to accomodate new hooks
- Minor reworking of Event class
- Added dispatchtest module to test new dispatching
- Made event types case insensitive
- Removed the need to declare types beforehand in TYPES constant
- Other stuff