Add a --coverage-dump option to save coverage results to files

We use this option to store the coverage results into JSON files, so that we can generate HTML reports later.