Improve optimizations for boolean values

LLVM doesn't handle i1 value in allocas/memory very well and skips a number of optimizations if it hits it. So we have to do the same thing that Clang does, using i1 for SSA values, but storing i8 in memory.

Fixes #15203.
I can't, because this function doesn't use the regular building blocks like `Block`, but uses a `Builder` directly.