Repository.xs: Refactor checkout code

Added git_hv_to_checkout_opts function which may be used
by other code paths that need to interpret checkout options
i.e. merges.
Reference.xs: Allow target() to take a new target
Reference.pm: Updated target() documentation
Changes: update
Index.xs: Added has_conflicts(), conflict_cleanup() methods
Index.pm: Added documentation for has_conflicts(), conflict_cleanup() methods
Changes: update