QoS1 and QoS2 implementation

Hi,
I have implemented a quality of service 1 and 2 for messages with all the confirmation logic.
I have also corrected how the response message type is read, it was working fine for connack but nothing else.
I assume there will be more work required on the QoS for will and connect packets.
Also would be nice to expose dup option when publishing.

I have no tests as I am not well experienced with ruby stuff but the code is working with my broker in the same way as my other mosquitto / nodejs / java clients.