Adds logic to preserve encoding entries for instrs that were filtered out. Such preserved encoding entries are delayed to the next instr in the trace for their corresponding pc, if any. This is required because TRACE_TYPE_ENCODING entries must be immediately followed by an instr entry, since they must be tied with a pc.
Extends the record_filter_unit_tests to verify encoding preservation.
We also want to add a unit test that filters a freshly generated trace. But the default generated trace format is .zip now and we don't have zip file reading or writing support in record_filter yet. Added a TODO for now and manually verified the tool on a new .gz trace.
Issue: #5675