Port openJDK8 changes to java.nio.charset

- Mostly javadocs changes.
- CharsetEncoder #replaceWith assigns value of "newReplacement" to
   "replacement"and not the reference.
- CharsetEncoder #replacement creates a copy of "replacement" and then
   returns the copy.
- Made changes in the tests which were expecting old  behaviour
   for the above two methods.

Test: run cts -p android.core.tests.libcore.package.harmony_java_nio
      run cts -p android.core.tests.libcore.package.libcore

Bug: 30964930
Change-Id: Id09238074ace5e92a5864a90aca360079847abf2
9 files changed