Fix coding style inconsistencies
Fix newline handling on serial prompt

Sending just a \r on enter, as seems to be common in serial console
programs, was no longer working. This was broken when we switched from
letting bitlash handle the serial input to handling it ourselves.

Previously, bitlash just handled commands whenever it saw a \r or \n,
which we mimic now. However when sending a \r\n, this would in extranous
newlines. This did not happen in bitlash, since it completely clears any
pending input after completing a command. Since we don't (want to) mimic
that input clearing, we have to take a bit of extra care to properly
handle \r\n instead.

This commit makes sure that \r\n, \r or \n works as a line separator
now.