Guard against NPE when Shell is not running.

Guard against NPE when Shell is not running.
Also, clean up some uneeded imports.
Use a more reasonable default DEBUG value.
Use the Android Handler object

Without this patch, we use a Object for
mHandler which means that the operations are
essentially noops. This is vital for unit
testing, but results in code that does
not functional properly when integrated
with production code.
Call stopProcess() and don't just notify.

Manually tell the shell that this process
stopped.