[FIXED JENKINS-19739] When installing a plugin and the needed dependencies have compatibility issues, warn the user

(cherry picked from commit de9816ee7a80f27477be73ec9a0abc05f3dd2702)
Use @Restricted(NoExternalUse.class) for new API members
Fixing JenkinsRule as HudsonTestCase was for optional dependencies in e11c01c.
(Implies reverting c4e3add as well, since we need resolvePluginFile to return null.)
(cherry picked from commit ea85489a0a8eafaf70917af8079a1839b264c1e7)