Work around overzealous NULL pointer checking in memcpy() and memset() for
some systems.
Convert two unreachable branches into assert() statements.
Add the SQLITE_CHECKPOINT_TRUNCATE option.
When attempting to restart a wal file, make any required calls to sqlite3_randomness() before waiting on or checking for wal file readers. This restores the behaviour exhibited by the trunk.
Add support for SQLITE_CHECKPOINT_TRUNCATE.