save a last_install file with the result of the last package install attempt

When installing a package, create /cache/recovery/last_install, which
contains the filename of the package and a 1 or 0 for success or
failure.

Also, don't mount ext4 and vfat filesystems as read-only (on devices
where /cache is ext4, we need it to be read-write).

Change-Id: I0cf2a1921bbd65e06343aa74e2006577fac77c2c
diff --git a/roots.c b/roots.c
index 1143b76..cb7e067 100644
--- a/roots.c
+++ b/roots.c
@@ -177,15 +177,14 @@
     } else if (strcmp(v->fs_type, "ext4") == 0 ||
                strcmp(v->fs_type, "vfat") == 0) {
         result = mount(v->device, v->mount_point, v->fs_type,
-                       MS_NOATIME | MS_NODEV | MS_NODIRATIME | MS_RDONLY, "");
+                       MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
         if (result == 0) return 0;
 
         if (v->device2) {
             LOGW("failed to mount %s (%s); trying %s\n",
                  v->device, strerror(errno), v->device2);
             result = mount(v->device2, v->mount_point, v->fs_type,
-                           MS_NOATIME | MS_NODEV |
-                           MS_NODIRATIME | MS_RDONLY, "");
+                           MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
             if (result == 0) return 0;
         }