Update deprecation warning classes and warning catch code.
Review Request #11929 — Created Jan. 12, 2022 and submitted
Some of our warnings code predated the Djblets-specific deprecation
warning classes, and these made it hard for us to search for
deprecations to remove in new releases. Those have been updated to use
Unit tests have been updated to better check for warnings by using
catch_warnings. This slims down the code and
makes the behavior more consistent.
This led to finding one assertion check that was no longer valid, and
some calls to deprecated code that didn't check for deprecation warnings
(which leaked warnings to the test runner). Those have been updated to
Unit tests pass on all supported versions of Python and Django.