Replace use of WarningManager by warnings.catch_warnings and then deprecate it.

The WarningManager class is no longer needed as Python versions < 2.6 are no longer supported. The WarningMessage class used with WarningManager is documented as deprecated but doesn't raise a warning, it should only have been used internally to WarningManager.