JENKINS-15380. Add some length checking before trying to substring.
Compare string length directly in if to get a shorter method.
Unittest hudson.cli.ListJobsCommand
List Jobs recursively in hudson.cli.ListJobsCommand
simplify isReadyToRestart
[FIXED JENKINS-17451] "projects tied to slave" shows unrelated maven
module jobs. shows TopLevelItem only.

Restricts displayed projects to TopLevelItem only.
[FIXED JENKINS-17276]

Noting the fix.
Merge commit '9d8ee80' into rc
Merge pull request #802 from Vlatombe/JENKINS-17451

[FIXED JENKINS-17451] "projects tied to slave" shows unrelated maven
[JENKINS-17451] Noting.
Added basic abstraction for authenticating Executors
[FIXED JENKINS-16974] Unsafe to define a function in <script> without a generated name, as it could clash with functions defined in unrelated *.jelly that happen to included in the same page.
PersistedList now implements List, not just Iterable.

This required bridge method injector that maps boolean->void
run the build under the designated Authentication objec
Instead of authenticating Executor, authenticating AbstractProjects.

This is necessary because a part of the access control is determining which Executor can accept which Queue.Task, so we can't have the authenticator taking Executor as a parameter.

I briefly thought about changing ExecutorAuthenticator to authenticate Queue.SubTask, but doing this intelligently is very difficult as an authenticator wouldn't really be able to make any sensible decisions unless it checks for specific subtypes (think of the dist-fork plugin and the remote terminal access plugin that implements Queue.Task.) So I made the change to have it accept AbstractProject, which is really the primary use case anyway.

The relevant classes are renamed to better represent what it does now.
Have the scheduling algorithm honor the permissions
tweaking the wording a bit
Grouping related messages together
IntelliJ complains about this. Not sure if it's a real problem
added a test case for ProjectAuthenticator