Add tests for sqlite_stat4 sample selection. And a fix for the same.
Make sure the ANALYZE command allocates enough VDBE registers.
Change some assert() statements in vdbe.c to ensure that a memory cell used to store a VdbeCursor object is not also used for some other purpose.
Fix a crash that can occur following an OOM fault.
Fix a crash that can occur if the sqlite_stat3 or sqlite_stat4 table is corrupt.