Inflater: Revert ensureOpen() changes to upstream 8u121-b13

The luni implementation of Inflater threw an IllegalStateException if
it was used after its end() method had been called but upstream throws
NullPointerException in that situation. The ojluni version was patched
in change b3c5785d in order to fix some failing tests. This change
reverts that patch and fixes the affected tests.

Throwing an NPE instead of an ISE could cause app compatibility issues
but it seems unlikely and in that case the application could simply
catch both.

An ISE is a more meaningful exception to throw but the benefit is minor
especially given that the message clearly indicates why it was thrown
and does not seem sufficient to justify carrying an additional patch.

Bug: 111061052
Test: flash, CtsLibcoreTestCases
Change-Id: I91ca999a7d3e81c571f960e01b5a2557a1676592
3 files changed