Fix issue 10380

This pull makes two changes:

(1) Fix AA's typeinfo to override .compare; the default implementation always returns 0, which makes no sense when comparing two unequal AA's.

(2) Change the AA implementation to use typeinfo.equals instead of typeinfo.compare. We only ever need to check for key equality anyway, so there's no need to depend on .compare, _especially_ since the default implementation of TypeInfo.compare is to blindly return 0 if the derived class doesn't override it! Instead, we should depend on .equals only.