## 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/settings.py
"BACKEND": "django.template.backends.django.DjangoTemplates",
        "DIRS": ["frontend/dist", "posthog/templates"],
        "APP_DIRS": True,
        "OPTIONS": {
            "context_processors": [
                "django.template.context_processors.debug",
                "django.template.context_processors.request",
                "django.contrib.auth.context_processors.auth",
                "django.contrib.messages.context_processors.messages",
            ],
        },
    },
]
WSGI_APPLICATION = "posthog.wsgi.application"
# Social Auth
SOCIAL_AUTH_POSTGRES_JSONFIELD = True
SOCIAL_AUTH_USER_MODEL = "posthog.User"
SOCIAL_AUTH_REDIRECT_IS_HTTPS = get_from_env("SOCIAL_AUTH_REDIRECT_IS_HTTPS", not DEBUG, type_cast=strtobool)
AUTHENTICATION_BACKENDS = (
    "axes.backends.AxesBackend",
    "social_core.backends.github.GithubOAuth2",
    "social_core.backends.gitlab.GitLabOAuth2",
    "social_core.backends.google.GoogleOAuth2",
    "django.contrib.auth.backends.ModelBackend",
)
SOCIAL_AUTH_PIPELINE = (
    "social_core.pipeline.social_auth.social_details",
    "social_core.pipeline.social_auth.social_uid",
    "social_core.pipeline.social_auth.auth_allowed",
    "social_core.pipeline.social_auth.social_user",