Cleaned up the ingame widget initialization

This makes integrating the ingame map editor https://github.com/OpenRA/OpenRA/pull/4496 easier, but is also a nice cleanup in itself.
The problem with moving all this into a trait is that it ties the widget and trait code together.  If a mod wants to build their own UI that doesn't follow this hierarchy then they will need to duplicate and replace this trait too.