add checkout function
Merge remote-tracking branch 'dimat/master'
Code style fixes from comments in https://github.com/libgit2/objective-git/pull/125