rustdoc: Refactor structure of html::run

Instead of one giant function, this breaks it up into several smaller functions
which have explicit dependencies among one another.

There are no code changes as a result of this commit.
rustdoc: Freeze the cache ASAP

The cache is going to be used earlier in the HTML generation process, which
means that it needs to get into TLS as soon as possible.
rustdoc: Show all implementors of traits

When inlining documentation across crates, primitive implementors of traits were
not shown. This commit tweaks the infrastructure to treat primitive and
Path-like impls the same way, displaying all implementors everywhere.

cc #14462
rustdoc: Stringify more named lifetimes

cc #14462