Add shutdown calls for plugins when gracefully closing the TSD