Fix four issues in failure classification and history recording
1. Extract compiler version from layer.json deps field instead of using
empty string - searches for ocaml-base-compiler or ocaml-variants
2. Record dependency_failure entries for packages that have no build
layer by comparing solutions against scanned layers
3. Deduplicate history entries by checking for existing run_id +
build_hash before appending
4. Record doc success entries for blessed packages, not just failures
Also extract matches_any helper to clean up classify_build_failure and
doc category detection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>