Refactor identifiers & model to make *_git_object() functions work on model classes instead of dicts
Since we now use these classes everywhere, computing hashes required
using to_dict() just to compute identifiers, which can be a performance
bottleneck in code computing many checksums.