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

https://issues.jenkins-ci.org/browse/JENKINS-23481
Is it always ready? It makes sense to check <code>Jenkins.getInstance()</code> against <code>null</code> at least