Add detection of dead struct fields
Remove the dead code identified by the new lint
Mark relevant structs with repr(C)
Add missing repr(C) annotations to mutex.rs
Fix an LLVM assertion when matching against static strings

Fixes #8315
Fixes #11940
Remove a redundant bitcast from fail!() handling
Move lint.rs out of middle

We're going to have more modules under lint, and the paths get unwieldy. We
also plan to have lints run at multiple points in the compilation pipeline.
Move lint infrastructure and individual lints into separate files
Rename lint::Lint to lint::LintId
Convert lints to a trait-based infrastructure

The immediate benefits are

* moving the state specific to a single lint out of Context, and
* replacing the soup of function calls in the Visitor impl with
  more structured control flow

But this is also a step towards loadable lints.
Replace enum LintId with an extensible alternative
Store the registered lints in the Session
Clean up and document the public lint API

Also change some code formatting.

lint::builtin becomes a sibling of lint::context in order to ensure that lints
implemented there use the same public API as lint plugins.