Reference: implement peel()

This makes both objects and references peelable via the same interface,
simplifying how to get to the wanted type.
Repository: make use of peel for diff()

Instead of trying to reimplement parts of it, make use of Object.peel()
and Reference.peel() to get to a Blob or Tree.