Almost finishing synchronizeReplication.

Only missing part is the run binlog client until group_id
code, but that requires lower layer changes.