Add Java 6's java.util.Arrays changes.

I've kept our binary search implementation and just generalized the
interface.

I've gone out of my way to preserve exception priority. I know we don't
agree that it's necessary, but it is important if we want to be able to
run other people's tests. If someone wants to write a new high-quality
test suite (which would be a great thing to have), we should remove the
hacks. (I've commented them.) Otherwise, I've gone out of my way to keep
the near-duplicates forced on us by Java's primitive type system as
identical as possible.

This passes all harmony and jtreg tests.

Change-Id: I91fbf707dac76124c6dbe59b0b30b7ded9a69529
2 files changed