ModuleView: Improve code for header updates
Clean-up and refactor around updatePageIconHeader() method and uses.
By moving the header logic into this method, we reduce some duplicity present in different codepaths and make it less bug-prone, specially on IconView.
BUG: 432093 FIXED-IN: 5.24
The diff can look a bit scary, but it's basically just moving things around and removing duplicates/unnecesary code