create parent paths of target mounts as needed

Currently if you want to bind mount a single subdir, you have to make
sure to create the full parent directory chain.  For example, if you
want /var/lib/timezone/ but not the rest of /var, you have to do:
	-k none,/var,tmpfs
	-k none,/var/lib,tmpfs
	-b /var/lib/timezone/
For every additional subdir, you need to add another -k option just to
do an [effective] mkdir with a tmpfs mount.

The current -k/-b behavior is to run mkdir if the target doesn't already
exist, but only for the final target.  Lets extend it to also create any
missing parent paths, so now only the base path needs to be writable:
	-k none,/var,tmpfs
	-b /var/lib/timezone/

Bug: None
Test: `minijail0 --profile minimalistic-mountns -k none,/var,tmpfs -b /var/lib/timezone /bin/date` works
Change-Id: I7f36bcb445ce40ed66a9403a4ee1c1fe3f9e5ea8
diff --git a/system.h b/system.h
index 7f36ad2..b816f5f 100644
--- a/system.h
+++ b/system.h
@@ -51,6 +51,8 @@
 int write_pid_to_path(pid_t pid, const char *path);
 int write_proc_file(pid_t pid, const char *content, const char *basename);
 
+int mkdir_p(const char *path, mode_t mode, bool isdir);
+
 int setup_mount_destination(const char *source, const char *dest, uid_t uid,
 			    uid_t gid, bool bind);