Refactoring of checkout argument checking

* src/git2r.c (checkout): More work to fix checkout functionality