Finally implemented proper column name sanitation behavior and used it everywhere.
Note that besides trimming whitespace the field id's are themselves *not* changed when they do not make a valid column name. Instead only the columnname itself becomes the sanitised version of the id.
Measures have been taken to ensure that field->column look-ups still work (by applying sanitation if no column is found using the 'as is' id).
The same behavior is used to clean up captions which are used as id's.

Note: this could still use some testing...

Signed-off-by: Matthias Stevens <matthias.stevens@gmail.com>