bpo-39983: Add test.support.print_warning() (GH-19683) (GH-19687)

Log "Warning -- ..." test warnings into sys.__stderr__ rather than
sys.stderr, to ensure to display them even if sys.stderr is captured.

test.libregrtest.utils.print_warning() now calls
test.support.print_warning().

(cherry picked from commit d663d34685e18588748569468c672763f4c73b3e)
5 files changed