## 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!
posthog/models/feature_flag.py
import hashlib
from typing import Dict
import posthoganalytics
from django.contrib.postgres.fields import JSONField
from django.db import models
from django.dispatch import receiver
from django.utils import timezone
from posthog.ee import check_ee_enabled
from .filter import Filter
from .person import Person
__LONG_SCALE__ = float(0xFFFFFFFFFFFFFFF)
class FeatureFlag(models.Model):
    class Meta:
        constraints = [models.UniqueConstraint(fields=["team", "key"], name="unique key for team")]
    name: models.CharField = models.CharField(max_length=400)
    key: models.CharField = models.CharField(max_length=400)
    filters: JSONField = JSONField(default=dict)
    rollout_percentage: models.IntegerField = models.IntegerField(null=True, blank=True)
    team: models.ForeignKey = models.ForeignKey("Team", on_delete=models.CASCADE)
    created_by: models.ForeignKey = models.ForeignKey("User", on_delete=models.CASCADE)
    created_at: models.DateTimeField = models.DateTimeField(default=timezone.now)
    deleted: models.BooleanField = models.BooleanField(default=False)
    active: models.BooleanField = models.BooleanField(default=True)
    def _query_postgres(self, distinct_id: str) -> bool: