Split API classes and interfaces

This is essentially everything that makes up an `OP_QUERY` (i.e. everything necessary to create a cursor on the server).