Support resolution of any part of the RHS of an import

Right now resolveImport can resolve the entity name on the RHS of an import. But we only support resolving the whole entity name, not an arbitrary part of it. This change supports resolving an arbitrary part of an entity name. I've rewired resolveImport to call into this helper, and getTypeOfNode calls into it too now. This may be useful for the language service for go-to-definition.