readdir: Fix offset instability
Directory changes after opening or rewinding a directory are not required to be visible in the readdir()
result. However, entries unrelated to the changes must not be skipped or duplicated.
The previous readdir()
logic could not guarantee these constraints when the offset was changed to a non-zero value.
This branch replaces the ordered map for directory entries with the combination of an append-only vector and a hash table.
Edited by Jürg Billeter