[rustdoc] Fix `--show-coverage` when JSON output format is used
I realized while looking on the docs.rs page of the `sysinfo` crate that the coverage numbers displayed were wrong:

I realized that it was because `--show-coverage --output-format=json` was relying on the same logic as the JSON output for the doc generation whereas it should not. I fixed it by changing the API for querying `is_json` a bit.
The underlying issue is that JSON output format is stripping reexports of items from private modules.
r? ``@notriddle``