NSS: Use nss_ctx as memory context in set_netgr_lifetime()
We've noticed some crashes that happened because gctx is already freed,
but the timeout handler is still called. In order to avoid that, let's
remove the timeout handler when nss_ctx is freed at other places.
Resolves:
https://pagure.io/SSSD/sssd/issue/3523
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
(cherry picked from commit e2ee9ff3bcd321c5ab9746a83ce81aaaf71f5355)