Tweaks to comments in btree.c.  Minor code changes to enhance testability.
Improvements to the wording of some comments.  Reinstate an assert() that
is only true for non-corrupt database files by adding an "|| CORRUPT_DB" term.
In the balance_nonroot() routine, protect the values in aPgno[] array from
change during the page sort, so that aPgno[] can be used to avoid unnecessary
pointer-map updates for auto_vacuum databases.
Remove an unnecessary branch from balance_nonroot().