Fix runtime type generation for basic types

Previously, basic types were wrapped in named
types which had no package. Now there's no
wrapper type, so we need some additional checks
when deciding to create full type information
or reference (common linkage) globals.

Also, somewhat simplified package path resolution.
The importpath for a package is now determined prior
to calling into go/types, so there's no need for
all the empty string checks.