Improved event functionality

Event system now supports event bubbling and non-cancelable events.
Switched build system to Apache Ant

Still depends on a separate copy of Phackager - will fix eventually
Improved database API

Much improved database API, with complete abstraction, iterators, and
buffered results.
Converted license to Markdown
Added init target