[FIXED JENKINS-23481][FIXED JENKINS-23551] Send onOffline notification to master computer prior Jenkins restart

https://issues.jenkins-ci.org/browse/JENKINS-23481
Off-topic: It makes sense to add JSR305 annotation to new methods in order to let users know about possible nulls