rustdoc: Correctly classify enums/typedefs

Both of these items are surfaced as a DefTy, so some extra logic was needed in
the decoder module to figure out whether one is actually an enum or whether it's
a typedef.

Closes #14757