[tests] Use allowed_failure with Python 2 behaviour
With Python 3 unittest.expectedFailure fails tests if they passes unexpectedly.
In some circumstances tests fail or pass if the test parameters aren't
deterministic. In such cases the test suite should be able to pass like
it does with Python 2.
- Don't care about exceptions other than AssertionError; they should always fail.
- Unfortunately this decorator does not work with subtests
- Remove deprecation warnings and allow this decorator to be used in such cases described above
- Additional documentation