Add error message for anonymous impl for types not declared in the current module

Followup to RFC 57.

Fixes #7607
Fixes #8767
Fixes #12729
Fixes #15060
For the `compiletest` runner you can't break up the error message on multiple lines. If the line runs long you can tag the test with `// ignore-tidy-linelength.

Also, how come this error message is on the import rather than the impl itself? would it be possible to be on the impl?