WIP: Compact the database when shutting down
This branch compacts the database during shutdown. Performance tests have shown this leads to faster startups but slower shutdowns.
To make slow shutdowns less noticeable, NavDrawerActivity finishes as soon as the shutdown process starts, without showing SignOutFragment. If the user relaunches the app before shutdown completes, SignOutFragment is shown to let the user know that shutdown is still in progress.
SignOutFragment now uses the same padlock icon as OpenDatabaseActivity.
Could be backported, but let's not rush - the performance tests showed that compacting produces great variation in shutdown times, so we need to make sure the worst-case behaviour is acceptable.
Edited by akwizgran