Exit cleanly when SIGTERM is intercepted

Currently when SIGTERM is intercepted Docker exits with code 143. Due to this Systemd marks it as failed.

With this patch Docker exits cleanly with code 0.