doc: document the #[deriving] attribute.

Closes #4916.