include/mount-api-utils: add statmount and listmount
* Make the includes and ifdefs in the file more generic, to cover
other interfaces besides just HAVE_MOUNTFD_API.
* Add #ifdef HAVE_STATMOUNT_API to the header file.
* Add fallbacks for statmount and listmount masks and flags.
* Add a local definition of the structs mnt_id_req and statmount.
We do not want to depend on kernel headers for now, as all of this is
still under development. Installed headers may provide old versions,
and a solution based on #ifdef will still require local definition of
the structs.
* Add wrappers for the statmount() and listmount() syscalls.
* Add sys_statmount(), a wrapper for statmount() that reallocates the
statmount buffer (on EOVERFLOW errno) if it is not large enough.
Note that for now, we are directly using syscalls and do not require
libc support for statmount() and listmount(). The kernel API is very
extensible, as it is based on structs rather than syscall arguments.
Therefore, I doubt we will see any libc support in the near future.
The code uses the "ul_" prefix for locally defined variables and
functions to prevent conflicts with kernel headers and potential
future versions of libc.