Miscellaneous rustdoc fixes

This PR:

- makes rustdoc colour trait methods like other functions in search results;
- makes rustdoc display `extern crate` statements with the new `as` syntax instead of the old `=` syntax;
- changes rustdoc to list constants and statics in a way that is more similar to functions and modules and show their full definition and documentation on their own page, fixing #19046:

  ![Constant listing](https://i.imgur.com/L4ZTOCN.png)

  ![Constant page](https://i.imgur.com/RcjZfCv.png)