mds: fix readdir end check

If the last item in the directory is a remote link and the corresponding
inode is not in cache, the readir reply will not contain the last item.
But iterator 'it' is equal to dir->end() in this case, it causes the 'end'
flag of the readdir reply be set to true.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>