Use primary key from logs in chats table.
Always show "view earlier messages" link in chats.
Use chat_url rather than chat when generating chat urls.
Update archive-related messages.
More stuff for switching the chats table's primary key.
Delete sessions from mysql if they've been deleted from redis.