Updated to new extern crate syntax.
Added warning for old deprecated syntax
Fix spelling errors and capitalization.
auto merge of #16923 : wickerwaka/rust/crate-as-fixup, r=alexcrichton

Changed occurances of:
extern crate foo = "bar";
to:
extern crate "bar" as foo;

Added warning for old deprecated syntax
Allow trailing commas in bitflags! macro
Test attributes
Attach documentation to the bitflags! macro itself

This is in consistent with the style demonstrated in the std::macros module.
Use {} for bitflags! definition and invocations

This looks nicer because it reflects Rust's other syntactic structures.
auto merge of #16982 : jbcrail/rust/comment-and-string-corrections, r=alexcrichton

I corrected spelling and capitalization errors in comments and strings.
auto merge of #16986 : bjz/rust/bitflags, r=alexcrichton

Closes #16469