Slightly better modularity, minor cleanups.

Introduce Git2::Repository::Defs to hold structs/flags
that only relate to repo methods.