apps.main: old database importer, from openerp attempt

A few months ago, I had written a MySQL->inventory migration script
for the OpenERP version of this app. Now, import that code and port
it to Django. We need some data to work against...
Merge branch 'take2' into importer
mysql_suck: fix operation of Contain_column

Unlike OpenERP, the Django framework requires that the base model is
saved first, and then the connected record is created. Luckily, the
current API allows that with a minor modification.
mysql_suck: in this case, empty values are None, not False
mysql_suck: fix typo at exception formatting

This must also be fixed in the OpenERP sandbox.
mysql_suck: remind me that expressions, in Django, are dicts
import_ktim: set encoding, remove debug lines
import_ktim: table of delegates

Or "anadoxoi" ...
import_ktim: rest of the tables to be imported

Still with some errors to be fixed
Merge branch 'take2' into importer
mysql_suck: initialize the django model of Table_Suck earlier

This way it will be available during the init() phase of columns.
mysql_suck: Str_Column_Default class, which is never left blank

A string column, which defaults to some non-empty string, in case the
source data is blank.
mysql_suck: change Contain_Column, again, using the manager

We don't need to explicitly know the model of some contained column,
since its manager exposes the create(**kwargs) method. This makes our
process easier.
mysql_suck: Ref_Column must pass an object reference, not just the id

We may know the id, but still have to pass Model.objects.get(id=id) as
the reference
mysql_suck: ParentName_Column, so that existing parents will be merged

See docstring of class.
mysql_suck: adapt Ref_NN_Column, like ref~2, to reference an object
mysql_suck: empty ForeignKeys must be None, not False

Unlike the convention in OpenERP, where this code had come from.
import_ktim: more tables, rules..

Now, most of the existing (snapshot) data can be migrated into a clean
db.

Pending are the 'manager_id' field of `monades` and the assets-related
tables which need special algorithm.
Merge branch 'take2' into importer
mysql_suck: let Ref columns explicitly specify model

This allows us to put in 'out' some column that doesn't really exist
in the Django model, subject to post-processing.