Codechange: Don't save unused NewGRF override mappings. #9202
Motivation / Problem
Saveload code for NewGRF entity override manager saves all entries for a table, regardless of whether they are mapped or not.
This is not a huge issue but is wasteful for saving objects as 64000 empty entries as saved.
This is resolved by testing if the override is valid, and only saving if so. The Saveload array already copes with sparse loading/saving so no saveload changes are needed.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
Seems valgrind doesn't fully agree with this PR:
When joining a multiplayer games. There are more similar errors following.
Maybe more useful what Thread sanitizer returns: