Gracefully shutdown the executor when the JVM dies.