Fix EnumOrdinalizer.

EnumOrdinalizer incorrectly selects enums for ordinalization
(replacement of the enum values by integer ordinals) under a
few circumstances.

Also:
 - fixed quite a few of the units tests.
 - allow ordinalization even with access to values().

Bug: issue 8846.
Change-Id: I9c22c1576a238d5f6b3a5f52b25b2ca697b83fad
5 files changed