linebuf: Use single-byte delimiters

This allows the delimiter string "\r\n" to be used to detect \r, \n, \r\n,
\n\n\n, or any combination of the characters in the delimiter string. This
is different from the previous system which required the whole delimiter
string to match.

The endl member of linebuf indicates the line ending to use for outgoing
lines, and can have any length.