Reapply "PGO: Statically generate data structures"

Reapply r204079 and r204083, this time with stubs for fputc in
compiler-rt.