compiler: clean up unresolved placeholders for pointer types

Add a new helper routine Type::finish_pointer_types that walks through
the pointer type cache and looks for placeholder types that may have
been created at some point before conversion of named types, and
invokes Type::finish_backend() on said placeholders.  This is needed
to handle cases where the compiler manufactures a pointer type as part
of lowering, then a placeholder is created for it due to a call to
Type::backend_type_size(), but there is no explicit reference to the
type in user code.

Change-Id: I9f92f206ed9c341373adcd0f126f3439e9390ccf
Reviewed-on: https://go-review.googlesource.com/51131
Reviewed-by: Ian Lance Taylor <iant@golang.org>
3 files changed