implement robust mutex support

This allows making everything in shared memory robust to
processes dying at any point in time (not actually done yet in this
commit).

This includes using FUTEX_REQUEUE_PI, but currently only on ARM because
that's the only place we can rely on the kernel not corrupting random
memory due to a bug (fix has been merged upstream).

Change-Id: Id5bda1dc3185a1aac759510934bce6fd9121ad3f
diff --git a/aos/common/mutex.h b/aos/common/mutex.h
index ce10a08..cc180f5 100644
--- a/aos/common/mutex.h
+++ b/aos/common/mutex.h
@@ -25,7 +25,9 @@
     // The mutex was acquired successfully.
     kLocked,
     // TryLock tried to grab the mutex and failed.
-    kLockFailed
+    kLockFailed,
+    // The previous owner of the mutex died.
+    kOwnerDied,
   };
 
   // Creates an unlocked mutex.
@@ -37,7 +39,7 @@
   ~Mutex();
 
   // Locks the mutex. If it fails, it calls LOG(FATAL).
-  // Returns false.
+  // Returns true if the previous owner died instead of unlocking nicely.
   bool Lock() __attribute__((warn_unused_result));
   // Unlocks the mutex. Fails like Lock.
   // Multiple unlocking is undefined.