Fix sorting to keep threads together

This patch expands the sort of the messages to sort by URL first then by date; this associates items from the same thread together then time-orders them, so threads are actually readable.