Add lint for misplaced/obsolete attributes

This patchset makes warning if crate-level attribute is on item, since it is usually by a mistake e.g. without semicolon.
This also gives an info for obsolete attributes.

Closes #3348