compiler: follow-on fix for finalizing imported methods
compiler: follow-on fix for finalizing imported methods

This patch is a revision to CL 185518, which added code to perform
finalization of methods on types created by the importer and not
directly reachable until inlining is done.

The original fix invoked the finalization code at the end of
Import::read_types(), but it turns out this doesn't handle the case
where a type with methods is read in due to a reference from something
later in the export data (a function or variable). The fix is to move
the import finalization call to the end of Import::import().

Testcase for this bug is in CL 187057.

Fixes golang/go#33219.

Change-Id: I2ec83b4df8ec554b4bfbbd590eb1049c341a415a
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/187058
Reviewed-by: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

golang/gofrontend,golang/gofrontend,golang/gofrontend,golang/gofrontend