Add readdir/2

readdir/2 lists files within a directory. This duplicates some of the
functionality of the file and filelib modules in the stdlib but, since
the process may be running as a different user than beam and may be
running in a different mount space or chroot, the stdlib may not have
access to the requested files.

Since the main purpose of this function is to support enumerating
cgroups, opendir(3) and closedir(3) aren't accessible from erlang
(similar to setns, but differing from support for open, close, read,
 write).
tests: call exit during forkstress

On slow systems, the process may not have exited from a kill before the
next process is started, causing the test to fail with {error,eagain}.