Added some docs and a bugfix on debugging a JVM tool (like jar-tool)

I've had to do this a few times and always have go to search through my notes so I felt like this should be documented.

Also, fixed an issue so that we can debug a nailgun tool easily.