readdir(): set missing d_reclen field

Our "struct dirent" returned by readdir() has a field d_reclen, which
our implementation didn't set. Given that our BSD-based implementation
has a constant size (the file name is limited to 256 bytes), d_reclen
is not very interesting since it's always sizeof(dirent). But nevertheless,
we must set it because Linux programs may rely on it.
So this patch correctly sets d_reclen.

In particular, the scandir() implementation we copied from Musl relies
on d_reclen being correctly set, so before this patch, it did not work
correctly (returned empty dirent structures). This patch also adds a
test for scandir(), which fails before this patch, and succeeds with
this patch.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>