Fix a missing mutex on page cache truncation during vacuum and auto-vacuum 
when SQLITE_ENABLE_MEMORY_MANAGEMENT is engaged.
Add additional pagerMutexHeld() macros to better verify the correct operation
of pager.c.
Remove all cache pages from the LRU list prior to removing the pager from the
pager list when closing a pager.
Avoid a race condition in the sqlite3_release_memory() logic within pager.c.
Always hold the MEM2 mutex when initially marking a pager as in use by its
database connection.
The iInUseDB and iInUseMM variables do not need to be volatile.