Update twsock.js so that it will not die when beanstalkd goes away.
Update twsock.js so that it will not die when beanstalkd goes away.

This was far harder to figure out than it should have been, variables
were become null at strange times, events didn't seem to make any sense
etc.

I finally had to make a very minimal sample of what I wanted to have
happen and then port back into the main code.

This is not particularly efficient: it will keep on retrying forever.
We may wish to investigate changing that.

TiddlySpace/tiddlyspacesockets,TiddlySpace/tiddlyspacesockets