save repo in magic for reuse in many classes

Helps get rid of repo argument in some methods. It's
annoying to pass it all the time.

More importantly some of these classes have pointer
to git_repository that is not ref-counted, so if
repo gets freed before all pointers to it then some
calls may result in bad access errors or segfaults.
ignore repo argument in Tree->diff

It's not required as git_tree_owner returns the pointer. Do it
in backwards compatible way with warning that it's going to be
fatal soon.
various clean-up and fixes
Tree.xs: do not dup entry from entry_bypath (closes #11)
Reference.xs: remove warning
Changes: update