refs: introduce an iterator

This allows us to get a list of reference names in a loop instead of callbacks.
refdb_fs: don't crash when the repo doesn't have a path
Make sure the ref iterator works in an repo without physical presence
Remove outdated test

Selecting wether to list loose or packed references is not something
we want to support anymore, so remove a test for this.
Add iterator support to the testdb backend
refs: implement _foreach with the iterator
refs: remove the OID/SYMBOLIC filtering

Nobody should ever be using anything other than ALL at this level, so
remove the option altogether.

As part of this, git_reference_foreach_glob is now implemented in the
frontend using an iterator. Backends will later regain the ability of
doing the glob filtering in the backend.
Move a couple more functions to use iterators
Introduce a glob-filtering iterator

If the backend doesn't provide support for it, the matching is done in
refdb on top of a normal iterator.
Merge pull request #1385 from carlosmn/refs-iter

Introduce a refs iterator