[hooks] Implement wrapper for readdir and readdir_r

struct dirent differs between bionic and glibc, and rewinddir needs
hooking.

Signed-off-by: Thomas Perl <thomas.perl@jolla.com>