dead lock prevention.

Access to JarLoader happens from inside classloading, and the act of
retrieving its proxy causes additional classloading. As a result, this
can sometimes cause a deadlock.

The classloader passed to
MultiClassLoaderSerializer$Input.resolveProxyClass (and hence to
Proxy.getProxyClass) is of RemoteClassLoader.

I first tried to force the eager proxy class creation, but this by
itself didn't work because the cache that Proxy maintains internally is
by ClassLoader.

So this is somewhat hack-ish, but in this change we look for a specific
proxy type that we use and resolve them outside Proxy.getProxyClass.

the following two threads illustrate a deadlock:

"Thread-1" daemon prio=10 tid=0x00007fac44036800 nid=0x54e3 waiting for monitor entry [0x00007fac90c71000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at java.lang.reflect.Proxy.defineClass0(Native Method)
	at java.lang.reflect.Proxy.getProxyClass(Proxy.java:504)
	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveProxyClass(MultiClassLoaderSerializer.java:127)
	at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1530)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1492)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
	at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
	at hudson.remoting.UserResponse.retrieve(UserRequest.java:211)
	at hudson.remoting.Channel.call(Channel.java:719)
	at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:162)
	at hudson.remoting.$Proxy0.waitForProperty(Unknown Source)
	at hudson.remoting.Channel.waitForRemoteProperty(Channel.java:1058)
	at hudson.remoting.JarCacheSupport.getJarLoader(JarCacheSupport.java:100)
	at hudson.remoting.FileSystemJarCache.retrieve(FileSystemJarCache.java:65)
	at hudson.remoting.JarCacheSupport$1.run(JarCacheSupport.java:62)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:99)

"pool-1-thread-1" prio=10 tid=0x00007fac50003000 nid=0x54e2 in Object.wait() [0x00007fac90dac000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000007ace50e48> (a java.util.HashMap)
	at java.lang.Object.wait(Object.java:485)
	at java.lang.reflect.Proxy.getProxyClass(Proxy.java:436)
	- locked <0x00000007ace50e48> (a java.util.HashMap)
	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveProxyClass(MultiClassLoaderSerializer.java:127)
	at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1530)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1492)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
	at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
	at hudson.remoting.UserResponse.retrieve(UserRequest.java:211)
	at hudson.remoting.Channel.call(Channel.java:719)
	at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:162)
	at hudson.remoting.$Proxy0.waitForProperty(Unknown Source)
	at hudson.remoting.Channel.waitForRemoteProperty(Channel.java:1058)
	at hudson.remoting.JarCacheSupport.getJarLoader(JarCacheSupport.java:100)
	at hudson.remoting.FileSystemJarCache.lookInCache(FileSystemJarCache.java:49)
	at hudson.remoting.JarCacheSupport.resolve(JarCacheSupport.java:43)
	at hudson.remoting.ResourceImageInJar._resolveJarURL(ResourceImageInJar.java:78)
	at hudson.remoting.ResourceImageInJar.resolve(ResourceImageInJar.java:42)
	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:227)
	- locked <0x00000007acd17b20> (a hudson.remoting.RemoteClassLoader)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	- locked <0x00000007acd17b20> (a hudson.remoting.RemoteClassLoader)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at java.lang.Class.getDeclaredFields0(Native Method)
	at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
	at java.lang.Class.getDeclaredField(Class.java:1880)
	at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1610)
	at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
	at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:425)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:413)
	at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)
	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:547)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
	at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
	at hudson.remoting.UserRequest.perform(UserRequest.java:98)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:326)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
[maven-release-plugin] prepare release remoting-2.28