Ensure serialization compatibility where possible

Not possible for org.junit.runner.Result
Merge pull request #994 from marcphilipp/serialization-compatibility

Ensure serialization compatibility where possible