Add server-side PostHog pageview tracking via middleware
Captures $pageview events for HTML responses with real client IP
from Cloudflare's CF-Connecting-IP header. Authenticated users are
tracked by DID with identify(); anonymous visitors use session ID.
Tracking is disabled when POSTHOG_API_KEY is unset.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>