Improve notification emails

- Retry with a delay after connection errors when talking to central scheduler.
- Instead of exit(1) on failure during scheduling, send an error email and continue.
- Some minor refactoring of notification code and some python style cleanup.
- Adjusted unit tests

Change-Id: I9f8a3caf2a37e34b2cd05028aa5c02d226006fe0
Reviewed-on: https://gerrit.spotify.net/gerrit/35787
TC-Compile-And-Test: Team City <teamcity@spotify.com>
Reviewed-by: Erik Bernhardsson <erikbern@spotify.com>
Reviewed-by: Anders Nyman <nyman@spotify.com>