Work around a limitation in the Microsoft Visual Studio preprocessor
Replace GIT_CHECKOUT_OPT macro with git_checkout_opt function
Fix GIT_SV_TO_REPO macro
Use Perl's PREINIT: blocks to ensure variables are declared before to code

Also includes some general consistency cleanup.
Don't use C99 initialization syntax
Repository.xs: Fix signed/unsigned comparison warning with MSVC
Reference.xs: Fix lookup of a symbolic reference. We were using an uninitialised base reference
Walker.xs: Supress warning about a possibly uninitialized Commit object
Raw.xs: make git_sv_to_ptr() default
clean-up