Bug 1074732 - [Messages] Create a mixin to handle the select UI model

- Create a selection mixin and extend the methods into view modules.
- Unify the UI update into one method and adjust the update flow to change the selected data first, then update (visible) UI based on data.
re: checking if we're in edit mode

For reference (since the comment is hidden now) your idea is to attach onSelected in edit mode, and remove it otherwise.

I'll just say: as you wish :)

Another idea is to have another "onSelected" in ThreadUI/ThreadListUI that would check if we're in edit mode, and delegate to _this_ onSelected if we're in edit mode, and do nothing otherwise. (of course we need creative names for the functions).

Architecture-wise, all these ideas are quite similar. In your idea and my last idea, ThreadUI controls when SelectionHandler's onSelected is called; in my first idea, SelectionHandler controls its own behavior. I honestly don't know which approach is best, so I'll let you choose :)