Use N separate cursors when scanning an index with N columns to collect sqlite_stat4 data. This fixes a problem with collecting incorrect nEq values from multi-column indexes.
Modify the vdbe code generated by ANALYZE to use fewer memory cells and cursor slots.