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.
Stop using Default for initializing builtin lints

It wasn't a very appropriate use of the trait. Instead, just enumerate
unit structs and those with a `fn new()` separately.
Run lint passes using the Option dance instead of RefCells
Use names in Lint structs in an ASCII-case-insensitive way

In preparation for the next commit.
Convert builtin lints to uppercase names for style consistency
Rework lint attr parsing and use it in middle::dead
Make the crate and its exported items available in the lint context
Drop the ExportedItems argument from LintPass::check_crate

None of the builtin lints use this, and it's now available through the Context.
Reindent function call continuations, and other style fixes
List builtin lints one per line for better diffs
Incorporate upstream changes to old lint code
Implement lint plugins
Test lint plugins
More upstream lint changes