Opening it up to plugins.

See https://groups.google.com/forum/#!topic/jenkinsci-dev/CPab12692Qs
and https://github.com/jenkinsci/jenkins/pull/873 for the context.

This change reimplements nullin's original commit as it contains too
many noise changes.