Refactor to make the fix for BZ54585 cleaner

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1451053 13f79535-47bb-0310-9956-ffa450edef68
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54585
Take account of setting of delegate when building the class path that is passed to Jasper

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1451061 13f79535-47bb-0310-9956-ffa450edef68