SIGN IN SIGN UP

Merge the latest trunk changes, especially the ORDER BY optimizer enhancements

but also other fixes, onto the sessions branch.

FossilOrigin-Name: f1fbb8c5bfa84e84e0b8e2872d83b06a0c0d5acc
D
drh committed
d1102b1ec7d50045cbbcf2575eacb2d423361fc7