Sort chats by last updated, like in iMessage app

The code is now more object-oriented to handle this new complexity.