Implement cleanup of update logs.

* Introduce database partition tag saved along the update log.
* Simple test scenario including solving migrated document and cleanup up.
* Implement the replication filter to be used for replication.

TODO:
* Make the scenario more complicated (modify the document in both partition)
between the modifications.
* Test continuous replication.
Refactor time.wait_for() to make it usefull outside the test.
Refactor testcase for replication and cleanup.

This is a preparation to make its scenario more complex.