Handle higher-rank lifetimes when generating type IDs

Normalize late-bound regions in bare functions, stack closures, and traits and include them in the generated hash.

Closes #19791

r? @nikomatsakis (does my normalization make sense?)
cc @alexcrichton 

This is wrong and I would expect it to cause terrible errors.
`'tcx` is the lifetime parameter of `ctxt`, not its lifetime - `&ctxt<'tcx>` to be precise.