Changed query API to reflect changes in livedb
Merge branch 'rewrite' of https://github.com/josephg/ShareJS into rewrite