Store the type of element in the database

Add a charfield on ElementModel to hold a string representing the
Element subclass.
Add a string->class dictionary in logic.py, to be kept up-to-date
whenever a subclass of Element is defined.
In Element::load_from_database() : use this extra information to create
an element of the correct subclass
In all constructors of Element subclasses, call the constructor of
Element with class_name set, so this info is actually stored in the
database.