Use a single write to the database to convert each resource. Add a
method to the versioned object class that encapsulates the DB-specific
information, and get rid of the Resource.set_requires() classmethod that
just calls a method on the versioned object instance that's passed to
it.
Change-Id: Ieca7e0f0642c38c44fb8d7729333a0ccd93c9cb4