text_entry: Expand to common prefix initially when completing.
Clarify byte_array.allocate.

It was unclear whether byte_array.allocate(Cap, ByteArray) should
allocate enough space for exact Cap bytes, or Cap bytes plus a string
terminator.
Parse address lists per RFC 5322.

Previously we just split address lists at ", " and hope for the best.
Now we try to parse address lists into a structure and work with that,
e.g. writing out message headers.  Addresses with valid or invalid
syntax are highlighted on the compose screen.
Add base64 routines.
Add RFC 2047 encoder/decoder.
Encode/decode address display names per RFC 2047.
Use distinct type for header values.
Add RFC 2047 encoder/decoder for unstructured text.
Encode/decode Subject header value per RFC 2047.
Decode RFC 2047 encoded-words in ISO-8859-1 charset.
Refuse to send message when a header contains an invalid address.
Add RFC 2231 encoder for MIME parameter values.
Encode attachment filenames per RFC 2231.
Use RFC 2045 token production for media types.

The only difference is that '{' and '}' would be allowed in content
subtypes whereas they weren't before.
Allow non-ASCII characters in addressbook aliases.
Don't squeeze linear-whitespace when unfolding header field bodies.

It's not necessary and not RFC-compliant.
Reverts 62e5adbb3353fe0ce17c79b93ed91bc415e3ceaf
Use string.unsafe_between to avoid redundant string length calculations.
json: Improve parser and unescape routine.

Make the JSON parser stricter, following RFC 7159.

- restrict allowable whitespace
- parse floats (though not needed for notmuch output so far)
- restrict unescaped characters in strings
- support escaped surrogate pairs for non-BMP characters in strings
- allow Unicode Non-character code points in strings

Make the corresponding changes for the string unescaping routine.

Pay attention to the location of parse errors.
json: Let parse_json be cc_multi.

Propagate the cc_multi-ness up to the caller, and let the caller decide
to promise all parse errors as equivalent if it wants.
json: Rename array functor to list.

We represent JSON "array" values as lists, and that's how I think of
them.  JSON object values are already named "maps".