device: fix crash when master connection fails

When the master AC becomes ready, activate_stage1_device_prepare() is
called in a idle handler. If the master AC fails in the meantime, it
will change state to deactivating or deactivated. We must check for
that condition before proceeding with slave activation. Note the the
'master_ready' flag of an AC is never cleared after it is set.

Fixes: 5b677d5a ('device: move check for master from nm_device_activate_schedule_stage2_device_config() to end of stage1')
17 jobs for bg/rh1747998 in 64 minutes and 20 seconds (queued for 1 minute and 19 seconds)