This adds two methods to noui, that allows temporarily suppressing (and then resuming) the output from noui. For situations where errors are expected, it's confusing for the test binary to output an error and then conclude with No errors detected. It also uses this supress/reconnect in the tests that currently produce verbose errors when running test_bitcoin.
Backport of core PR16277.