Fix release from #1860 (hotfix #1934).

- Cron job to send weekly email report is processed multiple times. Review scheduling process to send to only one worker.
- Implement mechanism to ensure each email is sent only once to each recipient.
- Improve the way the async task is processed by creating a separate task for each organization, instead of processing all organizations in a single task.
posthog/tasks/email.py
import datetime
import logging
from typing import Optional
from posthog.email import EmailMessage, is_email_available
from posthog.models import Event, PersonDistinctId, Team
from posthog.templatetags.posthog_filters import compact_number
from posthog.utils import get_previous_week
logger = logging.getLogger(__name__)
def send_weekly_email_report() -> None:
    """
    Sends the weekly email report to all users in a team.
    """
    if not is_email_available():
        logger.info("Skipping send_weekly_email_report because email is not properly configured")
        return
    period_start, period_end = get_previous_week()
    last_week_start: datetime.datetime = period_start - datetime.timedelta(7)
    last_week_end: datetime.datetime = period_end - datetime.timedelta(7)
    for team in Team.objects.all():
        event_data_set = Event.objects.filter(team=team, timestamp__gte=period_start, timestamp__lte=period_end,)
        active_users = PersonDistinctId.objects.filter(
            distinct_id__in=event_data_set.values("distinct_id").distinct(),
        ).distinct()
        active_users_count: int = active_users.count()
        if active_users_count == 0: