Split repo generation from major version of index format

This makes the code easier to understand, if nothing else,
though in principle we could rely on repo generation alone.
The major version check is just extra paranoia.
Merge pull request #6 from typesafehub/wip/havocp-repo-generation

Split repo generation from major version of index format