Avoid use_ip_for_change_master mismatch

When the original master becomes a new slave, it always uses hostname for MASTER_HOST because it doesn't have any slave status.
In such a case, the original master should refer to new master's setting.
It may not the best way, but it is better.