Improve URI.equals performance.

The main improvement is that we're vastly reducing
the amount of garbage this method creates.

Also, get rid of some incorrect checks and add a new
benchmark test case.

Before vs. After:

URI                            Equals     1540.1 =
URI EqualsWithHeavilyEscapedComponent 11921397.1 ==============================

URI                            Equals     1337.2 =
URI EqualsWithHeavilyEscapedComponent   588934.3 ==============================

Change-Id: I9ddb87b8267f0ac6a3ac85c2989cc0dd305ef6a1
Fix several decoder bugs.

- NativeConverter should report unterminated character
  sequences to managed code.
- CharsetDecoderIcu should report those errors correctly
  from flush()
- InputStreamReader should check the return value of
  flush() and not ignore it altogether.

bug: 11665359
bug: 10729779

Change-Id: Ic678a645a4ef2b3fe70e2c900c0cd393679f1037

Conflicts:
	harmony-tests/src/test/java/org/apache/harmony/tests/java/io/InputStreamReaderTest.java
CipherInputStream: increase buffers for speed

This increases speed of CipherInputStreamBenchmark from 606ms to 28.5ms.

Bug: 12246774
Change-Id: If61c0a055fe1b8e87909711b15d0441fcdbe46c7

Conflicts:
	luni/src/test/java/libcore/javax/crypto/CipherInputStreamTest.java
Fix CTS test failure under ART

The Thread.interrupted() State from
SelectorTest.testInterrupted() was leaking into
SelectorTest.testManyWakeupCallsTriggerOnlyOneWakeup() causing
that test to fail when the CTS was run with the ART. Under
Dalvik the "interrupted" state was being reset, but it was
causing the test runner to run each subsequent test in its
own Dalvik instance (which probably slowed down the tests but
wasn't causing failures).

It is unclear why a Thread being in "interrupted" after a test
does not cause problems for ART in the same way it causes
problems for Dalvik.

Bug: 12905142
Change-Id: I677c1d46602d10e174ba3b6b8614529b5c902104
Fix Thread.sleep(0) of an interrupted thread

Bug: 12929305
Change-Id: I3061c3345c68de8bcf438e6935446b4f7cd76001

Conflicts:
	luni/src/test/java/libcore/java/lang/ThreadTest.java