Fix imprecision in type inference when merging a point array type and cone array type

In TypeInference when merging a PointType with a ConeType it is safe to return the cone type if
the underlying types are the same. Previously, if an array cone type and array point type were
merged this would result in a java.lang.Object even when the two arrays had the same base type.
Checking for equality first may also save a few cycles for reference types since the
isSubclass check is no longer performed for identical types.
Fixing bug in ClassHierarchy.getLeastCommonSuperclass

If C1 extends C2 extends C3 getLeastCommonSuperClass(C1,C2) would give C3 instead of C2