Refactor serial functions into SerialConnection

This simplifies the Dongle class by removing all of the serial concerns into a separate class. I'm doing this in preparation of switching to libftdi see #2.