Massive refactoring and some Configurator changes

Configurator now reports resize events to the resource gallery in a special way.

Configurator will call `resize()` with a single boolean argument. If `true`, the gallery is currently minimized (the tabs are visible), and `false` otherwise.