Implements #5449.
It only removes the doc directory and therefore keeps all other build artifacts intact.
When `--doc` is used all other options are ignored.
My test case is mostly copy&paste from `clean_release` so maybe the `.toml`s can be simplified.