database: new dump

Added a new table, fixed a few things and made it automatically drop
existing same tables.
sql: made sure emulation is turned off by default

Otherwise prepared statements would be effectless.
theme: added new class for topic stuff; fixes

Minor fixes and the new class used for topic related stuff.
index: topic display, listing, optimization, fix