Rewrite CopyOnWriteArrayList from scratch.

The previous implementation has many structural problems motivating
this rewrite. In particular, changes to sublists behaved quite
inconsistently with the RI.

This passes the tests in the Google Collections test suite.

Change-Id: I49c4a50659ef1f35dbff4abdd596d7fda815bcfe
http://b/3270784
2 files changed