[JENKINS-22834] Added tests for automatic approval.
[JENKINS-22834] Added tests for classpaths handling in the scriptApproval page.
[JENKINS-22834] Pareparation to merge. Revereted unrelated changes.