More improvements and fixes to the new SqliteTableModel

Change the way sorting is done to correctly sort all data even if it
hasn't been loaded completely yet.

Fix the navigation label and buttons by showing the correct information
again and fixing the validator of the input field.

Log all SQL statements executed from within the SqliteTableModel.

Silence a few warnings.
SqliteTableModel: Fix editing
SqliteTableModel: Inserting and deleting rows, clean up, bug fixes

Add some basic code to support inserting and deleting rows again.

Fix a few bugs here and there.

Do some general code clean up.
SqliteTableModel: Don't crash when opening an empty table