TrigValTools: Python fixes and new unit test for chainDump.py
Fix python3 issues discovered in chainDump.py in recent HLT reprocessing and add a new unit test to ensure we catch such issues early and not in production. The unit test is inspired by a similar test for rootcomp in the same package added in !35037 (merged).
Fixes ATR-21881