Implement `ckan repair registry` command.

At the moment this just re-builds the file index, but that *can* get
out of sync if someone goes back in time to an old ckan version and
uses it with a new registry file (as I did during testing). Most
importantly,this opens the way for other repair commands, we might
see a `ckan repair gamedata` in the future, for example.

Also, everthing about parsing command-line arguments make me cry.
The architecture for CmdLine is awful, as I was learning C# at the time,
and using a very different paradigm to what C# enjoys. I've tried
to move us towards something a bit more sensible for sub-commands,
but it's still awful.

I feel I should apologise more, but this actually fixed my registry
and I can install AGExt again. :)