Fix PetraAI constructing ships as ordinary units.
Since r25584 / rP25584 PetraAI constructed many ships (and cavalry) because they have the "Ranged" class and we didn't check for "Infantry" anymore when training workers.
Basically a patch by: @Angen
Differential revision: https://code.wildfiregames.com/D4193
Reviewed by: @Angen
Refs. #6250 by fixing the ships case.
Fixes the concern on r25584 / rP25584.