object: Export git_object_dup
Notify '*' pathspec correctly when diffing

I also moved all tests related to notifying in their own file.