Make sure revisions of a page are sorted by their id

Change-Id: Id5a79bf9b4ee7a7d3fed9c340db34f4673207b0c