Make JarUtil work with custom classloaders

Added the ability for users to set a "resolver" in JarUtil
that lets it find resources that are loaded by a custom classloader.
This is needed in OSGi apps (like Eclipse RCP apps), since OSGi
resources do not have simple jar: URLs (they use a custom
protocol called bundleresource:).
Add security checks to resolver methods.
Merge remote-tracking branch 'wwalker/bug_687_jar_resolver'
Minor edits to JarUtil.Resolver functionality: Exception types, avoiding duplicate processing of strings etc.