Move UTF8_BITS_INTERMEDIATE out of uint32_t enum.
Rewrite put_code to not have a bunch of repetitive code.