Fix failed assertions in UnifyAST.

Some codepaths in UnifyAST incorrectly assumed that getSuperClass() and
getImplements() on a class that was resolved (!isExternal()) would return
resolved classes and interfaces.

Change-Id: I75a8d9d0e2757ed1f6d5fd034f0ea456cd7e3ce6