fix bugs

change Function publish (topicname before content)
stop the ping timer when socket close
add PUBLISH message analyzing code
change PUBREC message analyzing code
change demo code
Merge pull request #2 from auciferjay/master

fix bugs