altosdroid: Deal with bluetooth connection failures better
Remember when we've closed the bluetooth connection so that we stop
operations, including reporting connection status messages or even
starting a connection attempt.
Pass the AltosBluetooth object back in connection status messages so
that TelemetryService can tell when messages from closed objects get
delivered. There's a queue between the two, so the above fix catches
most of these instances, but not all of them.
Stick a delay during reconnect -- if the TeleBT device is getting
power-cycled, it will need a few seconds to reconfigure the device at
startup, if AltosDroid manages to connect during that time, the
configuration commands will be ignored.
Unlock the AltosBluetooth device while we connect so that cancel
calls will actually work.
Signed-off-by: Keith Packard <keithp@keithp.com>