CharsetEncoderICU: Don't call updateCallback from <init>.

Changed for correctness and for consistency with CharsetDecoderICU.
The existing code is incorrect because we'd end up deleting the same
allocation twice (once from NativeAllocationRegistry's reference queue,
and once from the finally block) if updateCallback throws.

Related to b/37315864.

Test: run cts -m CtsLibcoreTestCases

Change-Id: I5425093ed7fbdc4aa69f5b9108428399b3c8c555
diff --git a/luni/src/main/java/java/nio/charset/CharsetEncoderICU.java b/luni/src/main/java/java/nio/charset/CharsetEncoderICU.java
index a981c18..3d12664 100644
--- a/luni/src/main/java/java/nio/charset/CharsetEncoderICU.java
+++ b/luni/src/main/java/java/nio/charset/CharsetEncoderICU.java
@@ -74,6 +74,7 @@
             byte[] replacement = makeReplacement(icuCanonicalName, address);
             CharsetEncoderICU result = new CharsetEncoderICU(cs, averageBytesPerChar, maxBytesPerChar, replacement, address);
             address = 0; // CharsetEncoderICU has taken ownership; its finalizer will do the free.
+            result.updateCallback();
             return result;
         } finally {
             if (address != 0) {
@@ -97,7 +98,6 @@
         // Our native peer needs to know what just happened...
         this.converterHandle = address;
         NativeConverter.registerConverter(this, converterHandle);
-        updateCallback();
     }
 
     @Override protected void implReplaceWith(byte[] newReplacement) {