internal/resolve: provide self-import check including embeds (#264)

The FindResult struct returned by RuleIndex.FindRulesByImport now
includes Embeds, a list of labels of embedded rules. This includes
transitive embeds.

FindResult.IsSelfImport returns whether a FindResult matches a given
label or contains the label in Embeds. When this is true, callers
should report an error or omit the dependency.

Fixes #247
5 files changed