Rework api module to provide complete coverage
This MR introduces a full refactor of the dqsegdb2.api
module to provide hooks into the complete (as documented) API, even where it wasn't actually implemented properly.
The dqsegdb2.query
module has been updated to use it, but with only one new function to extend the user interface.
I also refactored the docs.