Replication between clusters

Please do not merge this pull request.
I would like to discuss some design issues which are commented by "TODO" in code.
It's needed to distribute the queue forwarding in the same way as the master-slave replication.