Fix: don't allow free-wagon-chains to exceed max-train-length #8533
This doesn't fix #8295, but prevents any future AIs from ever getting in this state.
Motivation / Problem
In #8295 the AI created a very very very long free-wagon chain. This made me wonder why this was allowed. Trains are limited by a max length after all, so why not free-wagon chains?
This PR limits free-wagon chains under the same conditions trains are limited.
This makes no sense, that a free-wagon-chain could be larger than
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
This makes no sense, that a free-wagon-chain could be larger than the maximum length of a train, as you cannot put an engine in front of that anyway. And it prevents run-away AIs making very silly long free-wagon-chains.