Fix the paging order used by EntityPerPage.

The paging order needs to be id/type, not type/id, to
make good use of the database indexes. Attempts to
iterate over all page IDs where very slow, this change
should fix that.

Change-Id: I2b8dc080f03499e3818a03c8fb7a9b5b985aed5b
Merge "Fix the paging order used by EntityPerPage."