Added custom pubsub

It is loosely based on redis's pubsub, but it expects to give at most just one message on real time. When the connection comes back newer messages will be sent from the database