Use a TypedArena in ty::ctxt.

**NOTE**: rebased on top of #13670 to prevent conflicts.

This was inspired by seeing a LLVM flatline of **~600MB** when running rustc with jemalloc (each type's `t_box_` is allocated on the heap, creating a lot of fragmentation, which jemalloc can deal with, unlike glibc).