[Fix] re_cache: fix stale hyperscan ID handling during config reload
When hyperscan cache is reloaded, the old hs_ids array may contain indices
that now point to different regexps in cache->re due to regexp reordering
after config reload. This caused two issues:
1. Cleanup used stale hs_ids to reset match_type, potentially resetting
wrong regexps while leaving the actual ones with match_type=HYPERSCAN
but hs_scratch=NULL, causing assertion failures.
2. If validation failed mid-loop while setting match_types, some regexps
would already have match_type=HYPERSCAN before we freed scratch,
leaving them in an inconsistent state.
Fix:
- Iterate re_class->re hash table (actual regexps in class) during cleanup
instead of using potentially stale hs_ids
- Split validation and match_type setting into separate loops so we only
set match_types after ALL IDs are validated
Both file-based and Redis-based loading paths are fixed.