ODB writing fails gracefully when unsupported

If no ODB backends support writing, we should fail gracefully.
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 #2163 from ethomson/nobackend_odb_write

ODB writing fails gracefully when unsupported
Merge pull request #2164 from libgit2/cmn/refs-delete-iteration

refdb: catch a directory disappearing