CRAS A2DP: Properly handle a2dp_write error
CRAS A2DP: Properly handle a2dp_write error

When the a2dp connection is closed, should propagate the error so
that a2dp iodev will be closed.

Before this change, there is a potential bug that the a2dp iodev
can keep running even the connection is closed for whatever reason.
However this bug never get noticed because the iodev itself
always get closed immediately when bluez sends 'ClearConfiguration'
message.

BUG=chromium:264336
TEST=Manually add sleep(20); to the cras_a2dp_suspend() callback.
Connect a2dp device, open youtube to make audio playing, disconnect
a2dp device from UI in chrome://settings/bluetooth.
Before this change, a2dp device can run without problem(but no audio
actually heard) for 20 seconds; after this change applied, a2dp device
will be closed right after device disconnected.

Change-Id: Ifd7c6f22964774277968125e4d53330779efa212
Reviewed-on: https://gerrit.chromium.org/gerrit/63467
Reviewed-by: Chih-Chung Chang <ebe32a3bdce230d12f75781016b6b880113fb486@chromium.org>
Commit-Queue: Hsinyu Chao <8b91762bdbe27d3121b311091d7ca5125e9a8df6@chromium.org>
Tested-by: Hsinyu Chao <8b91762bdbe27d3121b311091d7ca5125e9a8df6@chromium.org>

drinkcat/adhd,drinkcat/adhd,drinkcat/adhd,drinkcat/adhd,drinkcat/adhd,drinkcat/adhd