fix KeyError in log for deploy errors
use actual mid of machine instead of assuming 1 when deploying controller charms. also adds some logging

Signed-off-by: Michael McCracken <mike.mccracken@canonical.com>
Explicitly return None from machine() when not found, and handle None in parse_state() by ignoring maas params. This probably indicates a 'fake' juju machine used for error reporting.

Signed-off-by: Michael McCracken <mike.mccracken@canonical.com>