Add support for command-line arguments.

Add support for parsing command-line arguments for other options. Use
MXBeans instead of iterators to get access to remote JMX classes. Use
the dumpHeap() method on HotSpotDiagnosticMXBean instead of jmap to
enable remote heap dumps. Allow configuring the output path for the heap
dump.