Fix leaks in ICU JNI.

Consistently use RAII to ensure we always clean up our UResourceBundle*s.

Remove redundant allocation/copying from the UnicodeString to jstring
conversion.

Also simplify a few other repetitive bits of code.

Note that getContentImpl is still in the old style because that function
contains gotos. The right fix for that function involves changing the Java
side to work with a class containing a field for each item, rather than the
current Object[].
1 file changed