compiler: rewrite Type::are_identical to use flags

A single flags parameter replaces the Cmp_tags and errors_are_identical
parameters. The existing behavior is unchanged.

This is a simplification step for future work that will add a new flag.

Change-Id: I922f04068454d4109aaea761c99be35811d6f1d9
Reviewed-on: https://go-review.googlesource.com/c/143019
Reviewed-by: Than McIntosh <thanm@google.com>
7 files changed