added lib/realtime/client.js.
realtime tests now use realtime client.
more realtime tests.
added more resilience to realtime.