Reworks the exit trap mechanism based on the deprecated SecurityManager to use a Java Agent that achieves this with bytecode rewriting. Adds support for modern Java versions past 17 where the SecurityManager is no longer available.
Start the server with -javaagent:nailgun-server.jar to enable the new exit trap.