implement WAIT command.

we need synchronous replication. see http://antirez.com/news/66 for details