Fix setting a calendar to a time during transition into DST

The transition into Daylight Savings Time (DST), i.e. spring
forward, results in a period of time (equal to the DST offset)
during which the wall clock time is incorrect. Basically, the
GregorianCalendar does not handle that situation properly and
calculates the wrong UTC time (in millis since 1st January
1970).

The reason this exists in Enso is because in OpenJDK the
handling of that situation is not performed directly in
GregorianCalendar computeTime() but instead in a special method
in sun.util.calendar.ZoneInfo. That means OpenJDK has similar
behavior to enso when a different TimeZone implementation, such
as SimpleTimeZone is used. That special code was removed so it
fell back to the code that is used for SimpleTimeZone which is
broken.

In pre-enso GregorianCalendar has a special method getOffset()
that is called for all instances of TimeZone that handles the
case so unlike OpenJDK it does work for SimpleTimeZone.

The solution is to add some code into GregorianCalendar that
handles the transition into DST specially. That means it will
work the same as pre-enso, not OpenJDK for SimpleTimeZone. As
it is complex I have refactored the code a bit more than
necessary in order to improve the structure and add some extra
documentation. I also added extra tests, some of which do not
work in OpenJDK.

Bug: 25897679
Change-Id: I06d0c81e8da20ec00267ed8ba24b26a8a2c163ed
3 files changed