preliminary support for parsing and printing split queries

Peter, can you take a quick look and see if this seems like a reasonable approach so far?
The difference there is that the evaluation of `string` does not normally cause output to be written to the stream. The normal sequencing of the calls to `operator<<` relies on the fact that each call (other than the first one) depends on the result of a previous call to `operator<<`, which forces the calls to happen in the expected order. The indeterminacy problem arises when both operands to `operator<<` may write to the stream.