Replication

@enisoc 
OK this is the rest of the code to finish that unit test. It goes end to end now.
The next steps are to count the queries in each target, and re-add blp checkpoint / remove the primary key deletion (I can't easily match the end queries now as I don't count the data queries).