Collection minor version migration

I refactored all the util functions that I used in the module republished trigger with code for plpy and dbapi cursor.  But I will refactor the code (remove the plpy code) again when i've got plpydbapi working with everything.

The migration code is in cnxarchive/database.py create_collection_minor_versions.  @reedstrm Please pay extra attention to the tests to see if the assumptions are correct.