refdb: catch a directory disappearing

If a directory disappears between the time we look up the entries of its
parent and the time when we go to look at it, we should ignore the error
and move forward.

This fixes #2046.
Merge pull request #2164 from libgit2/cmn/refs-delete-iteration

refdb: catch a directory disappearing