Added cinit methods to ensure pointers are initialized to NULL
Added wrapper around git_reference