patch applied (cabal-install): Significantly refactor configuration handling