Started moving jpa mappings to xml.

This is so we can explicity define the database mappings.

And this should be easier if we move to another database -- we'll be in
control of the schema.

Worked out how to restore the database.