lowpan_hdlc_adapter: Wait for Event::OPENED before calling sendFrame()

Part of the LoWPAN HAL contract is that the user of the device interface
will wait until it receives LowpanEvent::OPENED before calling sending
frames using the interface. The LoWPAN HDLC Adapter was breaking that
contract, calling sendFrame pretty much immediately after calling open.

This change makes sure that we wait for the OPENED event before calling
sendFrame(). If we receive an ERROR event first, then we terminate.

Bug: b/69687483
Change-Id: I6e0574dbda00775eab6fe8a8c617521e4c48c8cc
1 file changed