Handle node down/node up correctly.

manual application of https://github.com/basho/riak_repl/pull/248.patch