Provide the user with a more useful error code when a looking up a reference which name points to a namepace

Relates to **[this comment](https://github.com/libgit2/libgit2/pull/1541#discussion_r4072173)**

Provided reference `refs/heads/foo/bar` exists, looking up for `refs/heads/foo` returns `GIT_ERROR` when `GIT_ENOTFOUND` may be more explicit.

Actually, on Windows, the code fails **[here](https://github.com/libgit2/libgit2/blob/development/src/fileops.c#L158)** with `errno = E_ACCESS` whereas, on Linux, the code runs a bit farther ans escapes **[here](https://github.com/libgit2/libgit2/blob/development/src/fileops.c#L163)**.