Fix an off-by-one error in the WhereCost to integer conversion.
Make the MIN() and MAX() macros available in sqliteInt.h.  Add TUNING
comments to the NGQP and adjust costs slightly.
Restore the ability to do a BETWEEN query on the rowid.  Also fix a
nearby comment.
Make sure that disabling the covering index scan optimization does not
prevent a covering index from being used to satisfy an ORDER BY clause.
An index might be useful for ORDER BY if any indexed column is in the
ORDER BY clause, not just the first indexed column.
Add a new ORDER BY optimization that bypasses ORDER BY terms that are
constrained by == and IS NULL terms of the WHERE clause.