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.
just want to point out that this works too:
```js
for (let [key, val] of selected) { console.log(key, val) }
```
(let or var)

I don't think this is necessary to use this form though, the forEach form works for me :)