Add stable selection pipeline events for contrib extension
Follow up to:
#3582504
**Description:**
Before RC1, the selector should expose stable extension points so contrib modules do not couple directly to `AiContextSelector` internals. This will make future selector refactors safer while allowing modules to filter, boost, inspect, or alter selection behavior through events.
**Scope:**
- Add selection pipeline event classes, for example pre-select, post-filter, post-select, and post-render.
- Dispatch events from stable points in `AiContextSelector`.
- Ensure events expose useful data without leaking mutable internals unnecessarily.
- Document the events for developers.
- Add tests proving subscribers can observe and alter supported pipeline data.
**Acceptance criteria:**
- Contrib can subscribe to documented selector events.
- No behavior changes occur when no subscribers are registered.
- Event dispatch order is deterministic.
- Tests cover at least one subscriber altering/filtering selection and one subscriber observing rendered output.
**Implementation notes (RC1):**
This issue implements two selector pipeline events for RC1: `ai_context.selection.post_select` and `ai_context.selection.post_render` (`AiContextPostSelectEvent`, `AiContextPostRenderEvent`, constants on `AiContextSelectionEvents`).
`pre_select` and `post_filter` are intentionally deferred to avoid locking candidate filtering/scoring internals before there are concrete contrib requirements. The `ai_context.selection.*` prefix is reserved for future pipeline events. See `docs/developers/events.md`.
All acceptance criteria are met. Additional behavior: view access checks on `setSelectedItems()`, read-only truncated item IDs on post-render, merge-only cache metadata via `addCacheableDependency()`, post-event `tokensUsed` recalculation, and warning logs when subscribers exceed configured `max_items` / `max_tokens`.
Tests: `tests/src/Kernel/AiContextSelectorEventsTest.php`.
**AI usage disclosure:**
- [x] AI Assisted Issue
- [x] AI Generated Code
issue