A light middleware that handles SIGTERM, refuses new requests and optionally exits the process when there are no more actve requests