syntax: allow setting attributes for deriving impls

The approach this takes is to extend the deriving DSL to accept the form
`TRAIT = VALUE`, where `VALUE` is one of the stability names, and the
appropriate attribute will be inserted into the AST of the generated impl.

Closes #18969