linebuf: Cache endl_len, and add function to set delimiters