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.