Introduce basic buffer management.

This commit introduces basic buffer managements where the data read
from the UART is queued in a buffer until we have a complete packet
that starts with 0xFE and ends with 0xFD. This reduces the number of
transfers and also allows special handling of certain packet types,
such as the keep-alive.
Ignore .log files.