DOC: Make sphinx fail the build when --warnings-are-errors is set
xref #22743 

We already had an option `--warnings-are-errors` in `doc/make.py`, but it was making the doc build cancel after the first warning was found, generating a Python exception. Changed to finish the build, and not raise any error, but exit with 1.

Also, when building a single document, ignore the broken reference warnings (they are broken because we don't build the referenced documents).
