server: clone ReplicationModeConfig to avoid data race (#4343)
server: clone ReplicationModeConfig to avoid data race (#4343)

close #4325

Signed-off-by: disksing <042dc4512fa3d391c5170cf3aa61e6a638f84342@disksing.com>

Co-authored-by: Ti Chi Robot <040e6455cde1c91e876ec337e785ce913eacba35@tidb.io>
pingcap/pd,pingcap/pd