Immutable references

References in libgit2 are now immutable.

/cc @jakeboxer @scottjg do you wanna take a look?