## Bug description

Currently, decide endpoint takes 10+ seconds on kea.js.org.

This means that for first-time visitors autocapture nor session recording will be turned on for that long - losing valuable information.

When measuring this yesterday via shell ([slack thread](https://posthog.slack.com/archives/C0113360FFV/p1604951621008400)), the culprit was feature flags cohort checking. In this case, the cohort user was checked against was defined against the following action:

![Screenshot from 2020-11-10 11-41-32](https://user-images.githubusercontent.com/148820/98657215-49582e80-234a-11eb-9669-37d55e0d23bd.png)

Which currently looks through events of the data for that team.

## Expected behavior

Decide endpoint should use cached/materialized cohort ownership rather than calculating it on the fly.

## How to reproduce

1. Create an action with some selector
2. Create a cohort for has done action at any point
3. Create a feature flag using the cohort.
4. Measure /decide endpoint latency

## Environment

Cloud 

## Additional context

cc @EDsCODE who made it not time out by https://github.com/PostHog/posthog/pull/2299

#### *Thank you* for your bug report – we love squashing them!
ee/clickhouse/models/person.py
sync_execute(
        UPDATE_PERSON_IS_IDENTIFIED, {"team_id": team_id, "id": id, "is_identified": "1" if is_identified else "0"}
    )
def create_person_distinct_id(id: int, team_id: int, distinct_id: str, person_id: str) -> None:
    data = {"id": id, "distinct_id": distinct_id, "person_id": person_id, "team_id": team_id}
    p = ClickhouseProducer()
    p.produce(topic=KAFKA_PERSON_UNIQUE_ID, sql=INSERT_PERSON_DISTINCT_ID, data=data)
def distinct_ids_exist(team_id: int, ids: List[str]) -> bool:
    return bool(sync_execute(PERSON_DISTINCT_ID_EXISTS_SQL.format([str(id) for id in ids]), {"team_id": team_id})[0][0])
def get_persons(team_id: int):
    result = sync_execute(GET_PERSON_SQL, {"team_id": team_id})
    return ClickhousePersonSerializer(result, many=True).data
def get_person_distinct_ids(team_id: int):
    result = sync_execute(GET_DISTINCT_IDS_SQL, {"team_id": team_id})
    return ClickhousePersonDistinctIdSerializer(result, many=True).data
def get_person_by_distinct_id(team: Team, distinct_id: str, filter: Optional[Filter] = None) -> Dict[str, Any]:
    params = {"team_id": team.pk, "distinct_id": distinct_id.__str__()}
    filter_query = ""
    if filter:
        filter_query, filter_params = parse_prop_clauses(filter.properties, team, table_name="pid")
        params = {**params, **filter_params}
    result = sync_execute(GET_PERSON_BY_DISTINCT_ID.format(distinct_query=filter_query, query=""), params)
    if len(result) > 0:
        return ClickhousePersonSerializer(result[0], many=False).data
    return {}
def get_persons_by_distinct_ids(team_id: int, distinct_ids: List[str]) -> QuerySet:
    return Person.objects.filter(
        team_id=team_id, persondistinctid__team_id=team_id, persondistinctid__distinct_id__in=distinct_ids
    )
def merge_people(team_id: int, target: Dict, old_id: UUID, old_props: Dict) -> None: