Branch.xs: upstream() should return undef if there isn't one.

The created reference should also take the repository in as magic,
seeing that Git::Raw::Reference -> target() requires it via git_obj_to_sv().