Port libminijail unit tests to C++.

That way they can be run on Android Platform Continuous Testing,
which requires gtest for parsing of test output.

Fix one issue in free_label_strings(), which was not setting
|labels->count| to 0. Also fix some nits in test files.

Bug: 30973585
Change-Id: I8bdb414329aab82e2180d412b9ecc128beab7227
diff --git a/util.h b/util.h
index 16a9daf..faf6315 100644
--- a/util.h
+++ b/util.h
@@ -14,6 +14,10 @@
 #include <syslog.h>
 #include <unistd.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define die(_msg, ...) do { \
 	syslog(LOG_ERR, "libminijail[%d]: " _msg, getpid(), ## __VA_ARGS__); \
 	abort(); \
@@ -87,4 +91,8 @@
  */
 char *consumestr(char **buf, size_t *buflength);
 
+#ifdef __cplusplus
+}; /* extern "C" */
+#endif
+
 #endif /* _UTIL_H_ */