qt: Re-work of advanced prefs tree construction code
This is the core of my re-work of the Qt advanced preferences tree construction code, which I'm free to publish now that !395 (merged) has merged.
It significantly tidies up the code, and additionally improves its robustness in places.
There are some bits and pieces that I've kept behind for later follow-ups. I'll work on publishing the MacOS side of things in parallel shortly.
There are 11 commits (added a , but they're all pretty small and easy to follow except for the fourth. I hope this is acceptable. (added a few more in response to discussion)
Edited by Lyndon Brown