Use text header for persistent build config
getConfigStateFile: throw meaningful exceptions, recover old LBI

getConfigStateFile now throws meaningful exceptions which are caught by
tryGetConfigStateFile and friends, which are allowed to propagate,
rather than just calling 'die'. If the LocalBuildInfo was generated by
an older version of Cabal, an exception is still generated, but the
LocalBuildInfo is included if it is recoverable. This feature is used to
reduce code duplication between the library and the test suite.
Merge pull request #2261 from ttuegel/binary-lbi

Use text header for persistent build config