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
Since we are likely to query allInputs later, caching id once for all seems not that bad. Or you think we should check the allSelected first and query allInputs when we really need this?