feat(query-engine): server-side query cache with TTL so pagination does not re-run the full query

Problem to Solve

Paginated queries re-run the full query for every page: there is no server-side result caching, so page 2+ of an expensive query costs the same as page 1. An existing TODO in the compiler acknowledges this.

Proposed Solution

Introduce a server-side query cache with TTL keyed on the compiled query (+ auth context), so subsequent pages read from the cached result set. Needs design for cache keying (including permission context), invalidation/TTL policy, and memory bounds.

Agent context — extended analysis, alternatives considered, related-code dumps

TODO at crates/query-engine/compiler/src/input.rs:290: "Server-side query caching with TTL to avoid re-running the same query on page 2+". Key design constraint: Rails owns authorization and GKG delegates access decisions per request (docs/design-documents/security.md), so the cache key must incorporate the authorization context or the cache must sit below the redaction/permission layer — this is the hard part, not the cache itself. No profiling was done to quantify the win; worth measuring typical page-2 costs first.