In 41bedbd we incorrectly decided
that unused no longer needed to deduplicate types. For the most part,
this was correct. However, it failed to account for pointer types.
go/types does not guarantee that types.NewPointer(T) ==
types.NewPointer(T). This caused parts of the graph to be incorrectly
This commit reverts the aforementioned commit, but puts our custom
Map in its own package, only to be used by the 'unused' check.
(cherry picked from commit 9680b43)