read_bounded_line read at most max + 1 bytes, so a line of exactly max
bytes followed by \r\n stopped after the \r and was refused, while the
same line followed by \n was read. It now reads up to max + 2 bytes,
strips the \n and a \r before it, and then checks the line against max.
A line of max + 1 bytes is still refused with either ending.
new_token returns 32 bytes from the operating system's random source as
64 lowercase hexadecimal characters, the form valid_token checks. A
server built on serve_lines can now create its per-launch token without
its own random source. The function and its getrandom dependency are
left out on wasm32.
serve_lines wrote replies with writeln!, which hands the writer every
string, number and separator of the JSON value as a separate write. On
an unbuffered TcpStream that is one system call per piece. Replies and
the closing rejection now go through a 64 KiB BufWriter and are flushed
once per line, so a small reply is one write and a large one is a few
buffer-sized writes without a second whole copy in memory.