Use bufio to only read whole packets at a time from the network
Forgot to account for longer msg lengths in main network loop. Needs closer attention to make neater
Fix up some more of the net issues
Consolidate the stop channels to only use a single channel, make internal connect a function that returns the connack return code rather than a goroutine and channel
change chan bool to chan struct{} for notification, remove unused functions, change functions names to match conventions.
update defers for convention of coming after the call they relate to