Adding an extra check to SlaveWasPromoted.

To make sure the new master is indeed a master.
Merge branch 'replication'