Add “unread” thread list filter, and refactor the “flagged” filter.

@gwprice