rustc: Add lint for misplaced crate attributes
rustc: Add lint for obsolete attributes

This also moves `#[auto_{en,de}code]` checker from syntax to lint.
std: Remove unused attributes

This also enables two tests properly.
Add tests for attribute lint
rustc: Add lint for unknown attributes
Add test for unknown attribute lint
rustc: Update obsolete attribute list
rustc: Add crate-level attribute lint
auto merge of #10316 : klutzy/rust/attr-lint, r=cmr

This patchset makes warning if crate-level attribute is used at other places, obsolete attributed is used, or unknown attribute is used, since they are usually from mistakes.

Closes #3348