Add mongoid ids to posgresql tables

This will allow us to write the datamigration.

These fields and indices will be removed once the final migration has
been run.