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