changed almost all log output to debug level, changed logging to blank out passwords for debug logging
change a bit of whitespace and final variables according to checkstyle (that is not quite finished)
use unchecked cast for json array of String (fails with class cast exception)

Signed-off-by: alexlehm <alexlehm@gmail.com>
removed Future for commandResult and use Handler instead
call shutdown on success and failure and remove mailFuture
changed some more whitespace
pass handler to write method, this way the handler can be set before writing the command or data

Signed-off-by: alexlehm <alexlehm@gmail.com>