SI-6961

Applying Jan Vanek's patch that makes list serialization maintain
structural sharing, as well as avoids a stack overflow for big lists.
See a more detailed explanation in the bugtracker.

Additionally, deserialization of lists serialized with Scala 2.10.1
and 2.9.x should work.
This legacy deserialization is embodied in the methods `readObject_2_10_0`
and `readObject_2_9_x`.