Crash when resolving a ref starting with "/"

<sup>This happened while developing the [Gitteh wrapper](https://github.com/jmendeth/node-gitteh). Forgive me if this has already been fixed.</sup>

Let's make a short, very short program:

```c
int status;
  
git_repository* repo;
status = git_repository_open(&repo, "path/to/a/repo");
//check status
git_reference* ref;
status = git_reference_lookup(&ref, "remotes/origin/HEAD");
//check status
  
git_reference_free(ref);
git_repository_free(repo);
```

Adjust `path/to/a/repo`, compile, run, and everything should go fine.
Now **prepend a `/` before the reference name**: `/remotes/origin/HEAD`
and the program will crash when looking up the reference:

```
nastyProg: /home/sweet/home/libgit2/src/refs.c:1626: is_all_caps_and_underscore: Assertion `name && len > 0' failed.
```

The problem is in `git_reference_normalize_name`, which calls
`is_all_caps_and_underscore` with `len = 0` because the first segment
before the `/` is an empty string.

As you can guess, `git_reference_name_to_id(... "/my/nas1y/sTrIng")`
would trigger this bug as well.