master: Abort when change sent by master can't be applied

This change prevents shadow master from becoming a master server if it
didn't apply all changelogs successfully.

Change-Id: I9d7076228ec7dfd05a53bfcf73f43467cdb4087e