Compute an adaptive IB budget ratio based on content characteristics.
Highly repetitive content → more aggressive filtering (lower ratio).
High-entropy diverse content → more conservative (higher ratio).
Task-type-aware IB filter. Uses TaskType to adjust structural weights.
force_keep lines (explicit protect tokens, #709) are kept verbatim on top
of the budget; &[] reproduces the pre-protect output byte-for-byte (#498).
#840: IB filter with optional markdown section-header preservation.
When preserve_section_headers is true, the nearest preceding #-header
for each selected line is injected into the output so fragments remain
attributable to their enclosing sections.