[9.18.25] Remove expired rdataset headers from the heap
It was discovered that an expired header could sit on top of the heap a little longer than desireable. Remove expired headers (headers with rdh_ttl set to 0) from the heap completely, so they don't block the next TTL-based cleaning.
(cherry picked from commit a9383e4b) (cherry picked from commit 756555db)
Closes #4591 (closed)
Backport of !8754 (merged)
Edited by Ondřej Surý