Changing the tenant context manager to not user threadlocals.