Adds prepareQuery event and removes prepareSequence event
Basic tests for query builder
Changes listener to listen to prepareQuery event instead of deprecated
prepareSequence
Renames abstract AbstractEvent to QueryBuilderEvent
Adds assertions to ensure that the query is valid
Fixes tests