Puts the type code in control of how to actually send the query off. In
particular, this allows `virtual queries' which only actually spawn
child queries for interesting records, and then collate the results.
Signed-off-by: Mark Wooding <mdw@distorted.org.uk>