Refactor ResolveResult and ModuleResolveResult to use indexed deduplicated arrays
Replace the flat `Box<[(RequestKey, Item)]>` primary field with three separate
arrays: `primary: Box<[(u32, u32)]>` for indices, `keys: Box<[RequestKey]>` for
deduplicated request keys, and `resolve_results`/`module_results` for deduplicated
items. This reduces memory usage when multiple primary entries share keys or items,
and enables key-only transforms (with_request, with_conditions, etc.) to share the
items array without cloning.
Adds accessor methods (primary_iter, primary_len, primary_first, etc.) and
from_pairs/map_keys_mut constructors to encapsulate the indexed representation.
Co-Authored-By: Claude <noreply@anthropic.com>