Fix AbstractCollection.toArray.

ConcurrentHashMap.values().toArray() could throw if the map was being modified.
WeakHashMap had a workaround, but AbstractCollection is supposed to just do the
right thing.

Bug: http://code.google.com/p/android/issues/detail?id=36519
Bug: https://issues.apache.org/jira/browse/HARMONY-6681
Change-Id: I749fe615edbea6f8285bfe6804c972e8bdcf2530
3 files changed