hdlc: convert state numbers to objects

We don't currently use the fact that these are objects, but it'll be
helpful down the road.
hdlc: implement an out-of-sync state and eliminate the start frame state

This also changed how completed frames are sent back, since we want to
be able to reset the frame buffer.
hdlc: implement the FCS 32 algorithm from the PPP spec (RFC 1662)
hdlc: add in hte check of the FCS sequence
hdlc: get rid of the frame_error state variable

Instead, just queue a None object to represent an invalid frame.
Introduce code to talk to hdlc.

Ideas behind communicating with the hdlc. This code still needs to be
fleshed out more as described in the code comments.
Flesh out coding of escape characters.

Build up a a data frame from data sent by the virtual serial. Check for
and code any escape characters encountered.
Restructure virtual serial for serial port channels

Instead of reading from multiple serial connections (not how hdlc works
here), read/write to channels on one serial connection. Basic structure
here, still detail work to be done.
Correct some strange phantom spaces

Having an issue with spaces appearing out of nowhere. Mostly committing
this minor fix to keep an eye on if/when this continues to pop up.
Add incoming data to the queue buffer

Implement threading to constantly acquire incoming data and store it in
a queue.
Reformat function names to match hdlc code.

Use underscores in names.
Pass a serial device to Receiver, not the serial port

Was providing hdlc.Receiver with a serial port on initialization rather
than a serial connection.
VirtualSerial takes a device instead of a serial device

VS should take a general device rather than specifically take a serial
device. This should help with testing.
HDLC _write function should take data (frame) as param

This function was never changed to take a data frame to write to the
device.
Append a valid FCS to frame when sending.

Implement a valid fcs generator to replace the placeholder fcs value.
Add open and add_channel functions to create VS channels

This will allow us to track channels by creating file-like Channel
objects that we can read and write to.
Introduce VS and Channel unit tests

Unit tests for Virtual Serial and Channel classes.
Relocate channel open function

Relocated to be a function of VirtualSerial for ease of use. A minor
change to the params of the read function was also made (length is a
required param) to mirror the read in hdlc.
Treat channel/cnd elements of the frame as integers

We were casting them as str before, now cast as chr
Add ChannelError exception for channel issues

Specifically this error is currently used when trying to access a
non-existent channel. A unit test has also been added for this error.
Another small change renaming the chan_buffers variable to
channel_queues.