patch applied (cabal-install): Refactor and update the hackage index reading code