rustc: Support stability attributes on crates

This commit adds support for linting `extern crate` statements for stability
attributes attached to the crate itself. This is likely to be the mechanism used
to deny access to experimental crates that are part of the standard
distribution.

cc #18585
rustc: Add some more checks to the stability lint

This catches uses of unstable traits in

```
trait Foo: UnstableTrait { }
```

and

```
impl UnstableTrait for Foo { }
```