libcore: Clean up Enum.compareTo(E)

As E extends Enum<E>, it is safe to cast the comparable object to
Enum<?> as it should not throw any exceptions. When it is cast, the
ordinal value can be accessed directly. Doing so would be preferred as
either both the variables this.ordinal and o.ordinal should be used or
the methods this.ordinal() and o.ordinal() should be used without
mixing them together.

Additionally, this fixes a build issue for JDK7 as the compiler was
complaining about the ordinal variable being private.

Change-Id: I07766b2756eaf09de2b054932bebc39dccce5731