Improve the serial parsing code

Characters are now read into a circular buffer. When a \n or \r is received, the previous 7 characters are parsed. Characters that are not \n, \r, or hex digits are ignored. No idea if this actually compiles...