Lists: test coverage for misc corner cases.

Add test coverage for minor functionality that was not previously
exercised by tests, according to coverage analysis.

This CL refactors ForEachRemainingTester to take a Supplier<Collection>
rather than a Collection class, in order to be able to test
List.subList().forEachRemaining().

The majority of the uncovered logic is left for future CLs.

Test: atest CtsLibcoreTestCases:org.apache.harmony.tests.java.util.{ArrayList,LinkedList,Vector}Test
Change-Id: I695758c4bef54086a66c270cc157ed35f95689cd
5 files changed