client: preserve ordering of readdir result in cache
Preserve ordering of readdir result in a list, so that the result of cached
readdir is consistant with uncached readdir.
As a side effect, this commit also removes the code that removes stale dentries.
This is OK because stale dentries does not have valid lease, they will be
filter out by the shared gen check in Client::_readdir_cache_cb()
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit
346c06c1647658768e927a47768a0bc74de17b53)