Sema: Unnest early exit and remove an unnecessary bad cast.

cast<ObjCObjectPointerType> doesn't look through sugar, getAs does.
Fixes PR15257.
Fix refactoring mistake in "Teach InstCombine to work with smaller legal types..."