(#2689) - Add tests about filtered replication

I add this test because currently when a filtered replication is running, if an
empty batch is returned (no remote document match the filter for this batch),
the replication stops. The expected behavior is that the replication keeps
running until it hits the last document sequence.
(#2689) - Replication stops when a filter is set (fix test; and make it pass)