Bug 1084298 - [Messages] Decoupling the all inputs query logic from DOM tree structure

- Add map for each view for maintaining the data for rendering/selection
I have mixed feelings, maybe doing in the simplest way right now and reconsidering later only if needed is the way to go here. So yeah, do it as you think would be simpler right now :)