Handle LocalBuildInfo for Cabal 1.21; squash commits; fixes #343.

Per #366, squashed commits to simplify the merge.