Add RepeatableObjectFactory to Backend tests

This allows sets of database inserts and fetches to be generated on the
fly in a repeatable fashion.