audio_streams: Fix incorrect write impl in AudioBuffer
audio_streams: Fix incorrect write impl in AudioBuffer

If frame_size is not "power of 2" (e.g. 12 bytes in 6channel/S16_LE),
current write implementation will trigger io::copy error since
- io::copy will split reader into multiple buffers with len() = "power of 2"
  if writer.capacity() >= DEFAULT_BUF_SIZE (which is 8192) and
- trigger early return since current write don't support incomplete frames
  writing.

Changes:
- Remove redundant write impl
- Fix write implementation in AudioBuffer
- Add io_copy_audio_buffer unit test

BUG=b:199001477
BUG=b:201382814
TEST=`cargo test`
TEST=`cargo clippy --all-targets --all-features -- -D warnings`
TEST=`aplay -Dhw:0,0 -f dat /dev/zeros -c 6` with virtio-snd

Change-Id: Ia6b587ab20f474d8c620b69940ca0cc7095da6db
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3331976
Reviewed-by: Woody Chow <cc0bff42e088f24a7e6e350b1e79cd0db9125d07@google.com>
Reviewed-by: Chirantan Ekbote <35787c0e27de5c48735e07f8324823b765e8bcbc@chromium.org>
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Commit-Queue: Chih-Yang Hsia <e09ac2debfefa3666e69a4e41e179a1517e8fddf@chromium.org>

google/crosvm,google/crosvm,google/crosvm,google/crosvm