Add C function to check S4 class git_branch argument

* src/git2r_error.c/h: (git2r_error_check_branch_arg): Added