Add explicit repository arguments to all diff constructors

And allow more things to be nil, matching libgit2.