n_tty: Use separate head and tail indices for echo_buf