libc: implement the whole mnt* family of functions

We had an implementation of getmntent, but its signature was wrong to begin
with. I doubt it was ever working, since it is not such a common function. But
even then, we lacked other functions in this family, like setmntent.

This patch implements them all. The main matching code comes from musl, but the
end result is significantly different. In particular, I didn't really want to
mess with creating new virtual proc files, symlinks and the such. Instead,
trying to opening a dynamic file (like /proc/mounts) or any of its famous
aliases will return a special value.

Functions like getmntent will be able to parse that value and act accordingly.
The code to show dynamic mounts comes from our old getmntent() implementation,
but it is here modified to not use statics for the strings so we can implement
getmntent_r() correctly.

Fixes #326

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
CC: Lyor Goldstein <lgoldstein@vmware.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mount: read initial entries from fstab

The main problem with supporting the setmntent function is not the code per se
- which is itself quite trivial. Rather, one expects that if this function (and
addmntent, for instance) is being used, somebody is about to make changes to the
system's initial mount points. We can make this all volatile, but I suspect users
would be frustrated to find out that the modifications made won't be reflected in
the system.

What this patch does, is that it creates an fstab file that is included in the
main build and contains our currently dynamic mounts for proc and dev.  When
OSv finds such a file, it will proceed mounting them.

The results here should be the same except for people booting using
bootfs.manifest, IOW, our initial build. Since we can build fine without those
pseudo filesystems, I didn't really bother doing anything about it.

I know this patch can be a bit polemic, since dynamically building a filesystem
list without depending on any file fits our model a bit better towards being
stateless as much as we can. But I believe it to be the right approach since
it will allow all the *mntent functions to write with the correct expectations.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
CC: Lyor Goldstein <lgoldstein@vmware.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>