libsnapshot: Add a helper for handling data wipes in recovery.

This patch also fixes a bug where the Initiated state resulted in
a SNAPSHOTTED state, despite not relevant to recovery or the
bootloader. SNAPSHOTTED implies the current slot will run off a
snapshot.

Bug: 139156011
Test: manual test
Change-Id: I30dbb0e79906550f08d4cd71194b1361fd5315c0
8 files changed