Add test helper for running code under bounded memory limits and asserting
graceful failure (no OOM panic/abort). Uses POSIX rlimit (RLIMIT_AS) on
Linux/macOS; skips on Windows.
Implements:
- run_under_memory_limit(): Execute closure with memory limit
- assert_fails_under_memory_limit(): Assert graceful failure
- assert_succeeds_under_memory_limit(): Assert success within budget
Applied to allocation-sensitive test scenarios (vector, string, hashmap
allocations). Tests with tight limits are marked #[ignore] to avoid
interference when run in the same process.
Closes: bf-4fa0y
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>