libsnapshot: Unmap COW devices when deleting snapshots.

When we stopped unmapping snapshots in DeleteSnapshot, this also stopped
unmapping the COW device. Of course, the caller has no way to unmap this
since it's an implementation detail. Therefore unmap it in
DeleteSnapshot.

This scenario can arise after rewriting or removing a snapshot-merge
device.

Bug: 136678799
Test: manual test
Change-Id: I9d4c8bcfbb95b4454edd1cf0853d51b441e895fa
diff --git a/fs_mgr/libsnapshot/snapshot.cpp b/fs_mgr/libsnapshot/snapshot.cpp
index 1719e72..2d1eab0 100644
--- a/fs_mgr/libsnapshot/snapshot.cpp
+++ b/fs_mgr/libsnapshot/snapshot.cpp
@@ -295,6 +295,9 @@
     if (!images_->BackingImageExists(cow_name)) {
         return true;
     }
+    if (images_->IsImageMapped(cow_name) && !images_->UnmapImageDevice(cow_name)) {
+        return false;
+    }
     if (!images_->DeleteBackingImage(cow_name)) {
         return false;
     }