Make custom events properly registerable.

Registerable events need to implement a static getHandlerList() method.
Add implementations of Object methods for a few classes
Implement getMaxSize() and getMinSize() (not enforced)
Improve QueryServer tools
Move QueryServer tools to util package