Implement a new flag "--write-metadata" which will create, in the output
directory, a file "foliage/packages.json" with metadata about the
package provenance.
The file package.json file looks like this
```
{
"Win32-network-0.1.0.0": {
"source": {
"url": "github:input-output-hk/Win32-network/3825d3abf75f83f406c1f7161883c438dac7277d"
},
"timestamp": "2022-10-17T00:00:00Z"
},
"Win32-network-0.1.1.0": {
...
```
The idea is that tools fetching the repo can also fetch this file to
obtain information about the package provenance.
1. Foliage takes as input a complete description of the index, where
source distributions and revisions come with a timestamp. This allows
us to recreate the entire index in a reproducible way.
2. Added a experimental command to import an index from a Hackage (as
downloaded with Cabal). This was originally a testing/development
need but there might be different use cases.