Issue kernel panic in case of failure to apply

just like the commit process does.
Uses update puller thread for catching up with master

before dropping the availability guard. Changes to make this behaviour
happen:
- UpdatePuller listens only to masterIsElected events and pauses
  the thread for every such event
- UpdatePuller does not unpause itself on slaveIsAvailable, because that's
  too late. Instead SwitchToSlave does the unpause after HA
  comminunication has been started and just before dropping the
  availability guard.
- UpdatePuller doesn't check for availability, that's a concern of the
  UpdatePullerClient only.
Merge pull request #3285 from tinwelint/2.2-catchup-race-fix

[2.2] Fixes race for slave catching up to master