Issue an unpublish before deleting a stream
Add graceful socket shutdown to RTMPPublisher and fix a few bugs