Remove unused database tables and some related unused code
Cleanup the schema by removing all unused tables, all old tables with still old, not needed data anymore.
Also removes related code that is either unused or just inserts into never read tables.