Backport Fix #1263: Implement java.io.InputStreamReader using CharsetsDecoders.

(cherry picked from commit 9b39c9ce38604e45939d0ddd7851ba064ab24e9e)