Rotation works with the database list dialog.

Removed the database handler from MainActivity.

Don't try to select a non-existant active tab on restore.