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
Not sure which storing way is better for this map. I put it in privateMembers at first, but it's meaningless if we could get the data from getAllInputs, and it also have performance penalty if we need to access this map frequently. Maybe we should return a array copy of map in getAllInputs to prevent the map be modified by others?