Null-terminate readlink() result, full remount.

In order to compare results from readlink() calls, we need to null
terminate the read value, otherwise we can end up doing an infinitely
recursive remount in the root namespace.

When remounting inside a namespace, unmount all existing mounts before
mounting the new storage into place.  This also means we need to mount
the user-specific symlinks back into place.

Skip spinning up the FUSE daemon when not visible, otherwise we get
stuck waiting for a daemon that never shows up.

Bug: 22192518, 22204412
Change-Id: Icc7db822354ab7ffc47c39cd0611f65edecc32e5
diff --git a/PublicVolume.cpp b/PublicVolume.cpp
index e4fdb86..29a357f 100644
--- a/PublicVolume.cpp
+++ b/PublicVolume.cpp
@@ -137,12 +137,15 @@
         initAsecStage();
     }
 
+    if (!(getMountFlags() & MountFlags::kVisible)) {
+        // Not visible to apps, so no need to spin up FUSE
+        return OK;
+    }
+
     dev_t before = GetDevice(mFuseWrite);
 
     if (!(mFusePid = fork())) {
-        if (!(getMountFlags() & MountFlags::kVisible)) {
-            // TODO: do we need to wrap this device?
-        } else if (getMountFlags() & MountFlags::kPrimary) {
+        if (getMountFlags() & MountFlags::kPrimary) {
             if (execl(kFusePath, kFusePath,
                     "-u", "1023", // AID_MEDIA_RW
                     "-g", "1023", // AID_MEDIA_RW
@@ -163,7 +166,7 @@
             }
         }
 
-        PLOG(DEBUG) << "FUSE exiting";
+        LOG(ERROR) << "FUSE exiting";
         _exit(1);
     }