Static method that registers process signal handlers for SIGTERM and SIGINT so the
agent shuts down cleanly. This is especially useful in Kubernetes deployments where the
pod receives SIGTERM before termination.
Only registers handlers once, even if called multiple times.
Optional configuration.
Shutdown timeout in milliseconds before the process exits.
void