[JENKINS-22397] Allow a Trigger to be a DependencyDeclarer

See [JENKINS-22397](https://issues.jenkins-ci.org/browse/JENKINS-22397).