Restore colour to rustdoc

This not only gives back the colour to structs, traits, and functions, but also restores the long-lost colour to enums. I’ve run [`linkchecker`](http://wummel.github.io/linkchecker/) and there don’t seem to be any more invalid links than usual.
I’m not entirely sure if the way I’ve implemented this is very idiomatic or reliable, but it seems to work.

Closes #17131.
Closes #16712.
Closes #16711.
Could we avoid building an entire `Map` just for looking up whether a node is an enum or not? I'm also not sure how difficult this will be with @eddyb's refactoring of the ast map.