Get the path to the database index using some code similar to what cabal-install is doing.

Unfortunately the actual config path nor a config parser, are exposed by
Cabal. So the parser used is really really simple and only tailored
to get the field remote-repo and remote-repo-cache.

fix #3