Cleanup error messages for anonymous impl for types not declared in the current module

Followup to RFC 57.

Fixes #7607
Fixes #8767
Fixes #12729
Fixes #15060
auto merge of #17321 : apoelstra/rust/error-on-unknown-impl, r=alexcrichton

Followup to RFC 57.

Fixes #7607
Fixes #8767
Fixes #12729
Fixes #15060