GroovyModelDsl must implement GroovyObject in order to get correct dynamic dispatch during nested closures.
Move ToolchainRegistry from being a project extension to being registered model.

All configuration of the tool chain registry is done via model rules. This means that all configuration could be skipped if the registry is not needed in a build. However, it always is currently because we always actualise all tasks (which involves interrogating the registry).

This is the first of the native model to be transitioned to the new model configuration scheme. Transitioning the rest is forthcoming.