Move ToolPanelManager operation to create or get section into ToolBox.
Now with unit test. Part of broader effort to make ToolBox interface more explicit, tested, and hide implementation details from other parts of code (such as ToolPanelManager).

Also reworked the code to now build up and re-parse XML structures - just use a dictionary - thanks to 34b3e1c.