feat(coreinit): gracefully shutdown on SIGINT/SIGTERM