Replication Tests

Added replication tests: PushReplicationWithAttachments and MultipleReplication. Modified some of the previous code to fix some issues.