Improve the performance of the ANALYZE command by taking advantage of the
fact that every row of a UNIQUE index is distinct.
Ugh.  Consecutive UNIQUE index entries are only distinct if the index is
on NOT NULL columns.  So the previous version was not quite right.  This
check-in fixes the problem.
Avoid change tests when analyzing single-column unique indexes after
getting past the initial NULL entries.
Avoid trying to allocation zero bytes when analyzing a unique non-null index.
Fix a bug in the whereRangeSkipScanEst() procedure (added by
check-in [d09ca6d5efad3e4cfa]) where it fails to consider the possibility
of a ROWID column when computing the affinity of a table column.
Improve the performance of the ANALYZE command by taking advantage of
UNIQUE constraints on indices.
Add constraints (enforced only when SQLITE_DEBUG is enabled) on the use of
OP_Next and OP_Prev.
Improved comments on VDBE opcodes, for better documentation.  No code
or logic changes.
Try to fix harmless compiler warnings reported by Fortify.
Avoid unnecessary no-op calls to applyNumericAffinity() for a small
performance improvement.
Remove an unreachable branch from the sqlite3_value_numeric_type() interface.
Improvements to comments in the multi-threaded sorter.  Also include a
function name change for clarity.  And add a test to help show that the
MergeEngine object is only used by a single thread.
Merge recent trunk changes into the threads branch.
In vdbesort.c, rename all pointers to sqlite3_file objects "pFd" and use the
name "pFile" only for pointers to SortFile objects.  Other comment enhancements.
In vdbesort.c, rename vdbeSorterDoCompare() to vdbeMergeEngineCompare() and
move it closer to the one place where it is called.  Other minor comment
changes.
Rename vdbeIncrMergerInit() to vdbeMergeEngineInit() - a much more accurate
name.
Remove an unnecessary parameter from vdbeMergeEngineStep().  Rename a couple
other routines to be more descriptive of what they do.
Fix the build on windows.
Add some asserts to the Win32 mutex subsystem.