Separate query runner api from query tool 

We want to use the query api from other tools.

* Checked that the exposed public method isn't used in VCloud tooling
* Kept deprecated method for backwards compatibility
* Also general tidy up - removed code that doesn't work or is unused, removed tests that are artefacts of TDD

/cc @annashipman