Ensure data is immediately sent to the debugger socket connection

clearBuffers() and JSBDebug_BufferWrite() will both immediately write data in the output buffer to the socket.

Note :
 * We have tested successfully with CocosBuilder. 
 * Comments in the code say that locking is not an issue. This needs review