some cleanup of SortedPartitionedCursor, it is now pasing hand tests and looks done. Needs automated tests