## 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
request_bodies="always",
            send_default_pii=True,
            environment=os.getenv("SENTRY_ENVIRONMENT", "production"),
        )
if get_from_env("DISABLE_SECURE_SSL_REDIRECT", False, type_cast=strtobool):
    SECURE_SSL_REDIRECT = False
# Proxy settings
IS_BEHIND_PROXY = get_from_env("IS_BEHIND_PROXY", False, type_cast=strtobool)
TRUSTED_PROXIES = os.getenv("TRUSTED_PROXIES", None)
TRUST_ALL_PROXIES = os.getenv("TRUST_ALL_PROXIES", False)
if IS_BEHIND_PROXY:
    USE_X_FORWARDED_HOST = True
    SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
    if not TRUST_ALL_PROXIES and not TRUSTED_PROXIES:
        print_warning(
            (
                "️You indicated your instance is behind a proxy (IS_BEHIND_PROXY env var),",
                " but you haven't configured any trusted proxies. See",
                " https://posthog.com/docs/configuring-posthog/running-behind-proxy for details.",
            )
        )
# IP Block settings
ALLOWED_IP_BLOCKS = get_list(os.getenv("ALLOWED_IP_BLOCKS", ""))
# Clickhouse Settings
CLICKHOUSE_TEST_DB = "posthog_test"
CLICKHOUSE_HOST = os.getenv("CLICKHOUSE_HOST", "localhost")
CLICKHOUSE_USER = os.getenv("CLICKHOUSE_USER", "default")
CLICKHOUSE_PASSWORD = os.getenv("CLICKHOUSE_PASSWORD", "")
CLICKHOUSE_DATABASE = CLICKHOUSE_TEST_DB if TEST else os.getenv("CLICKHOUSE_DATABASE", "default")
CLICKHOUSE_CA = os.getenv("CLICKHOUSE_CA", None)