libsnapshot: Implement OpenSnapshotWriter for compressed snapshots.

This does not implement OpenReader() yet, however, it implements enough
for some vts_libsnapshot_tests to start passing with Virtual A/B
Compression enabled.

Note that OpenSnapshotWriter() has been disabled when linking with init
or recovery. This is to avoid pulling in all the compression libraries
in those places. OpenSnapshotWriter is only designed to be called by
update_engine and will not work outside of normal operation.

Bug: 168554689
Test: vts_libsnapshot_test
Test: full OTA with update_device.py
Test: incremental OTA with update_device.py
Change-Id: I9737d28bdd5c5f4914bc30a2bb72f357d5f44d2b
5 files changed