Fix a potential reference off the end of an array in the query planner.
Remove unused variables from the command-line shell sources.
Add some extra assert() statements to silence a few clang warnings.
Fix test script pragma2.test so that it works with ENABLE_MEMORY_MANAGEMENT.
Initialize a variable in fts3_write.c on the grounds that the argument required to show that it does not require initialization with is complicated. Add an assert() to where.c to silence a clang scan-build warning.
Performance improvement in sqlite3BtreeNext() and sqlite3BtreePrevious()
for the common case of a valid cursor.
Performance optimizations in the VDBE and especially to the OP_Next and
related opcodes and in the sqlite3BtreeNext() and sqlite3BtreePrevious()
routines.  This is a cherrypick of [6f99b54aedeb], [d2efea1682a7], and
[d78c5d89de4b].
Merge performance enhancements and compiler warning fixes from trunk.