Systemd notify oom

Little refactoring and systemd support for oom notifying