Fix resolving relative to a JAR location.
Based on r1103295 from webservices.
This fixes the Gump failures for the LocalResolver test that execute with JARs rather than classes.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1516737 13f79535-47bb-0310-9956-ffa450edef68
Ensure that there is only ever one recovery thread running at a time.
It was pretty much impossible for this to happen with the previous code but there was a very small window where two threads could have been started. This change guarantees there is only ever one recovery thread.

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