Fixed the problem with pages having the same date.

If the order is by date and some page have the same date, only one will
be added to the array because it uses the date as the key.

By adding an auto-incrementing id the key is guaranteed to be unique.