Be more precise when including headers so that we're less likely to
depend on namespace pollution and as such become more portable. This
means including headers like <sys/types.h> or <stdlib.h>, but also
making sure we include system/host headers before local headers.
While here: define ENOATTR as ENOMSG in mtree.c. There is no ENOATTR
With this, makefs is ready for compilation on macOS and Linux.
Sponsored by: iXsystems, Inc.