compiler: don't read known type, simplify Import::finalize_methods

With the current export format, if we already know the type, we don't
have to read and parse the definition.

We only use the finalizer in Import::finalize_methods, so make it a
local variable.  To match Finalize_methods::type, only put struct
types into real_for_named.

Change-Id: I9cf0b03917abb1bc09f1a09dfb53ec80c81dd326
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/197700
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2 files changed