close update package before installing; allow remount

Close the update package before invoking the binary, to allow the
installer to unmount /cache if it wants to.  Add a function to allow
remounting of a mount as read-only.

Change-Id: Idfcc96c3da66083295177f729263560be58034e4
diff --git a/mtdutils/mounts.c b/mtdutils/mounts.c
index 2ab3ff6..c90fc8a 100644
--- a/mtdutils/mounts.c
+++ b/mtdutils/mounts.c
@@ -212,3 +212,11 @@
     }
     return ret;
 }
+
+int
+remount_read_only(const MountedVolume* volume)
+{
+    return mount(volume->device, volume->mount_point, volume->filesystem,
+                 MS_NOATIME | MS_NODEV | MS_NODIRATIME |
+                 MS_RDONLY | MS_REMOUNT, 0);
+}