Pick the latest version when the same package is in plan.json twice (#109)
Currently haskell.nix assums that each package will occur only once in the plan.json file. It turns out this is not always the case. If a package is included as a dependency of a `setup` component or `build-tool-dependencies` then it may be listed more than once. Currently we pick the first one in the `plan.json` file (via `Map.fromList`). This is not ideal as it is often an old version included to satisfy one of the `setup` or `build-tool-dependencies`. In particular `cabal-doctest` often results in picking an old version of `Win32` when cross compiling for windows. It can be difficult to get rid of the duplicates in the `plan.json` file itself (as a work around), because constraints cannot be added to the build time dependencies in `cabal.project`. The correct fix is to add support for multiple versions of the same package in haskell.nix, but this will require a lot of refactoring. This PR will help improve the situation by picking the newest version with `Map.fromListWith`, rather than just the first in the file.