Add storage writeback for A/B/R slot management

The slots::Cursor structure now maintains a reference to a writable
block device.
This is passed to the manager context on drop to allow for writeback
to storage.
It can also be used during fastboot to write to partitions or dump
partitions to host.

Includes ergonomic modifications to libstorage AsBlockDevice trait and
ancillary traits and free functions.
Specifically:
1. Split write* methods into write and write_mut variants that take
&[u8] and &mut [u8] respectively.
2. Remove the templating from write* methods.
3. Merge the BlockDeviceWrite back into AsBlockDevice

These are quality of life tests that make it easier to store block
devices and use their methods.

Tests: all gbl unit tests pass

Change-Id: Ib20f5c4d5a660dd1e312c30f60dd21c67802dc28
10 files changed
tree: 0829046d764209b7c73e04155e6c4434693a3cc7
  1. gbl/
  2. libxbc/
  3. vts/
  4. .gitignore
  5. BUILD
  6. OWNERS