Minor refactorings
Util function and generator to flatten lists
Parsing of MQTT v3.1 messages
Added few round robin iterators
Change to py3 style
Call connection_made callback