Force sorting by ID after all other sorts.

Resolves some unexpected tie-breaking situations, and bugs with tied
sorts around page breaks on MySQL 5.6+.