Let git-mktree validate tree objects better

So far, we have rudimentary parsing, but e.g. do not validate the listed SHA-1s. Let's fix this.