CRAS: a2dp - Don't flush too much when buffer level is low

The original strategy of flush_data() function is to encode PCM
buffer to SBC format blocks whenever there's data and try writing the
encoded data to A2DP socket.  This could consume too much PCM buffer
in one callback to cause buffer level drops below min_buffer_level so
audio thread thinks it underruns.

BUG=chromium:635426
TEST=unittest

Change-Id: I2f294a397868132b8810edb4a91a98f269376212
Reviewed-on: https://chromium-review.googlesource.com/411647
Commit-Ready: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
4 files changed