Adds ordering to favorites

Ordering was implicitly chronological with the autoincrementing `id`
field, but this makes it clear what the intent is.