Make sure close is always called
assert not null in constructor, not at close
Move call to close to a finally block
Move close into finally block
Just close the lookupCursor, not the whole cursor
Handle closed lookupCursor
fixed some indentation
comment
Just close the input not the whole cursor
Moved close into finally block
Always set cursor to null

because otherwise we may try to close a closed cursor if the next
method fails, and close() gets called later
Set cursors to null after closing

we check for nullness before closing, so when closed, set them
to null in a finally block.
check if cursor is already closed
Cleaned up SorterToCursorAdapter closing input
Check that cursor is not closed before closing
Move input closing out of sorter adapter
Added postgres test
Removed unnecessary tables from test
Half as many rows
Fixed up yaml a bit

not that it has the correct output, but I'll get back to that