fixed bug in pubnubbuffer.js and added a test using pubnub.js asynchronously inside a worker