tests: Use assertRaises as a context manager for GError test

Simplify tests/test_error.py:TestMarshalling.test_exception so that
it no longer needs to pull exception information out of sys.exc_info.