syntax: Add enum for defined attributes

This patch adds `attr::DefinedAttr` enum, which contains all attributes used by rust.
Also it adds `attr::contains_attr()` function which is similar to `attr::contains_name()` but accepts enum variant instead of string.
So it becomes possible to catalog all attributes at one place.

cc #7318