Changed serial comms code to work with new Chrome API

Google updated Chrome with breaking changes to the Chrome.serial API.
This update contains changes in the serial communications code to work
with this new API.