Fix broken serialization of libcore's DecimalFormat with ICU 59.

Internally, libcore's DecimalFormat uses ICU4J's DecimalFormat but this
internal object is not part of the serialized form.

Therefore it's necessary for the deserialization code to call the right
setters in the right order on ICU4J's DecimalFormat object to make sure
that the resulting object ends up being equals() to the one that the
object that was serialized had as an internal member.

This has become more complex in ICU 59 because of the interaction of the
properties and exportedProperties attributes. Calling a setter will make
an object no longer equals(), even if the value set is the default
value. For more information about this, see:

http://bugs.icu-project.org/trac/ticket/13266

For the objects recreated during deserialization to be identical to the
corresponding objects that were serialized, libcore's DecimalFormat must
work around this.

This change updates the deserialization code so that it with both ICU 58
and ICU 59 will create objects that are equals() to the objects that
were serialized, for all cases covered by existing unit tests.

It does not change the behaviour of DecimalFormat in any other way.

(Further work would be needed to also handle objects on which some
property before serialization has been explicitly set to a value
identical to the default value. This is a use case not covered by
current tests.)

Test: CtsLibcoreTestCases
Change-Id: I025d0327f59c14d668f68a0be54cb1737c395dc5
1 file changed