Repository.xs: Allow branches() to return a specific type of branch

Also updated ```libgit2``` (they have fixed some bugs in terms of ignores).
Fixed a documentation error in ```Repository.pm```.
Check the type passed to ```Git::Raw::Repository -> workdir()```.