Kill API server on shutdown.