## Bug description

strtobool is used in several places where it will cause deprecation warning in Pythin 3.10 and error in Python 3.12 since distutils will be removed in Python 3.12 .

Reference : https://www.python.org/dev/peps/pep-0632/

```
rg distutils                     
posthog/api/annotation.py
1:from distutils.util import strtobool

posthog/api/dashboard.py
2:from distutils.util import strtobool

posthog/api/insight.py
1:from distutils.util import strtobool

posthog/models/filters/mixins/common.py
4:from distutils.util import strtobool

posthog/settings.py
17:from distutils.util import strtobool
```

## Expected behavior

It's a good idea to vendor in the function as it's a short one.

## Environment

- [ ] PostHog Cloud
- [ ] self-hosted PostHog, version/commit: _please provide_


#### *Thank you* for your bug report – we love squashing them!

posthog/models/filters/mixins/common.py
events = json.loads(events)
            _entities.extend([Entity({**entity, "type": TREND_FILTER_TYPE_EVENTS}) for entity in events])
        return sorted(_entities, key=lambda entity: entity.order if entity.order else -1)
    @cached_property
    def actions(self) -> List[Entity]:
        return [entity for entity in self.entities if entity.type == TREND_FILTER_TYPE_ACTIONS]
    @cached_property
    def events(self) -> List[Entity]:
        return [entity for entity in self.entities if entity.type == TREND_FILTER_TYPE_EVENTS]
    @include_dict
    def entities_to_dict(self):
        return {
            **({"events": [entity.to_dict() for entity in self.events]} if len(self.events) > 0 else {}),
            **({"actions": [entity.to_dict() for entity in self.actions]} if len(self.actions) > 0 else {}),
        }
class EntityIdMixin(BaseParamMixin):
    @cached_property
    def target_entity_id(self) -> Optional[str]:
        return self._data.get("entityId", None) or self._data.get("entity_id", None)
    @include_dict
    def entity_id_to_dict(self):
        return {"entity_id": self.target_entity_id} if self.target_entity_id else {}
class EntityTypeMixin(BaseParamMixin):
    @cached_property
    def target_entity_type(self) -> Optional[str]:
        return self._data.get("type", None) or self._data.get("entity_type", None)
    @include_dict
    def entity_type_to_dict(self):
        return {"entity_type": self.target_entity_type} if self.target_entity_type else {}