## 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/api/dashboard.py
queryset = super().get_queryset().order_by("name")
        if self.action == "list":
            queryset = queryset.filter(deleted=False)
        queryset = queryset.prefetch_related(
            Prefetch("items", queryset=DashboardItem.objects.filter(deleted=False).order_by("order"),)
        )
        if self.request.GET.get("share_token"):
            return queryset.filter(share_token=self.request.GET["share_token"])
        elif self.request.user.is_authenticated and not self.request.user.team:
            raise NotFound()
        elif not self.request.user.is_authenticated or "team_id" not in self.get_parents_query_dict():
            raise AuthenticationFailed(detail="You're not logged in, but also not using add share_token.")
        return queryset
    def retrieve(self, request: Request, *args: Any, **kwargs: Any) -> response.Response:
        pk = kwargs["pk"]
        queryset = self.get_queryset()
        dashboard = get_object_or_404(queryset, pk=pk)
        dashboard.last_accessed_at = now()
        dashboard.save()
        serializer = DashboardSerializer(dashboard, context={"view": self, "request": request})
        return response.Response(serializer.data)
    def get_parents_query_dict(self) -> Dict[str, Any]:  
        if not self.request.user.is_authenticated or "share_token" in self.request.GET or not self.request.user.team:
            return {}
        return {"team_id": self.request.user.team.id}
class DashboardItemSerializer(serializers.ModelSerializer):