Move the order of the table declaration and adjust relation and backref mappings
Move the order of the table declaration and adjust relation and backref mappings

The order of the table declaration is important as some tables are referred
by others, so these need to exists first.
The relation and backref are also referring to the object rather than
the tables.

Devyani-Divs/mirrormanager2,Devyani-Divs/mirrormanager2,pombredanne/mirrormanager2,pombredanne/mirrormanager2,Devyani-Divs/mirrormanager2,Devyani-Divs/mirrormanager2,pombredanne/mirrormanager2,pombredanne/mirrormanager2