Small optimisation. The resolver and the factory are only used when running under a security manager so only load them in this case.
Also avoid a possible memory leak when creating these objects.

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