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
(cherry picked from commit 3d3c6cb5449665fc4671a1ee0b2b73b0e417f151)