Refactor treatment of DocDef in TreeInfo

Currently, TreeInfo is defined in scala-reflect and then
extended in scala-compiler to be able to treat DocDef nodes.
This is a bit unwieldly.

This commit defines the DocDef node abstractly in scala-reflect
with sufficient detail to unwrap the underlying definition as
needed in TreeInfo.
SI-7656 Simpler named args translation for pure args

 - Introduces `TreeInfo.isPure`, sharing code with the
   existing `isExprSafeToInline`.
 - Make both of these aware of by-name closures (Fixes SI-7664)
 - Permute named arguments in place to match the definition-site
   order if they are all pure, avoiding the needless Block which
   is troublesome for annotations such as:

      @deprecated(since = "", message = "")