Branchless encoding of codepoints into UTF-8.
Thanks to Nathan for the question and Lorenz for the CLZ insight of an earlier draft. Any remaining mistakes are mine.
See https://github.com/skeeto/branchless-utf8 for decoding (the reverse).