Initial implementation of struct-type contract generation.

Well, the "purpose statement" for `utils` is "things of general use outside of TR", which I think this belongs in. I'm inclined to do that refactoring later.