Before a native, in-process exec, shut down JMX agent.

If the JRuby JVM is started with the remote JMX agent enabled,
subsequence native exec of JRuby (basically restarting JRuby in
the same process space) can fail because the port remains bound.
This change uses internal OpenJDK classes to shut down the JMX
agent before a native exec, so it can restart in the new JVM.

A side effect of this is that if native exec fails, we must
attempt to restart the agent as well. This will break connections
for existing clients, but they would have lost connection had the
exec succeeded. I don't see this as a problem.

Fixes #1859.