Query support + general rewrite (almost)

Hey,

just for the fun of it I beefed up your impl to support both graph and vertex queries and while doing so, also corrected the transactional behavior. It now passes the full Blueprints 2.6.0 test suite. It ended up being an almost complete rewrite of your stuff but hey, your impl was a great inspiration to me.

Take it or leave it as you wish :)

All the best,
Lukas