fixed var_header and payload layout
fixed var_header and payload layout2
added QoS option
QoS1 support added
Merge pull request #3 from nscooling/master

Update to include QoS1 support