added support for publishing QOS 1 and 2.  also added a few test cases