added the critical section in RTMPClient & RTMProtocol classes to avoid the instance data attempts from different threads
added spawnSocketThread method invocation to demo code