Snapshot metadata

This isnt for merging yet, just WIP,

Bit of a slow start, but figured while I am still finding my way around the codebase i'll raise this so ppl can peek at the progress more conveniently and give me feedback as i go.
@charleso Is this what you had in mind?

Is `findOrCreateLatestCommitId` appropriate? It should technically always exist, but I was worried that if it didn't exist, then theres likely to be something seriously wrong, I dont know what the safest response is though, pushing another commit would potentially mess up the repo, but I'm not sure throwing an error at this point is much safer, the snapshot has already been created, if I throw an error it'll just leave it without metadata