[JENKINS-21316] PrioritySorter wrongly assumes Queue.Task is Job

 * Updated fix provided for [JENKINS-21310] to exit early
 * Updated javadoc to clearify responsibilities
Refactored to avoid unnecessary View.getItem() call
Refactored to avoid unnecessary cast
[JENKINS-21314] Stack trace displayed (...) configure PrioritySorter

Fixed related issue where exception was thrown when trying
to save empty PriorityStrategy list and "Use additional
rules when assigning a priority to a Job" was enabled.
Merge pull request #15 from emsa23/master

Towards 2.6