compiler: refactoring in Export class to encapsulate type refs map

Convert the Export::type_refs map from a static object to a field
contained (indirectly, via an impl class) in Export itself, for better
encapsulation and to be able to reclaim its memory when exporting is
done. No change in compiler functionality.

Change-Id: I2cd2647aee8dc704053f165b5508011f86479f60
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/184170
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2 files changed