Almost ready to switch SQLContext to cursor-based returning of results.
Finished first version of cursors, switched SQLContext to using them.