JENKINS-18491: Top level DSL extensions

Implemented the functionality outlined in https://issues.jenkins-ci.org/browse/JENKINS-18491.

All implementations come with tests.