Rather than using magic constants, pulling the min and max occurs for
substitution groups from XmlSchemaParticle.
Bug fix: if an element is the base of a substitution group, its
minOccurs and maxOccurs fields also apply to the other types in the
group.

This only applies to SchemaStateMachineGenerator.  Either a substitution
group is part of another group (sequence, choice, or all), so it is
already represented in the schema as an ARRAY of UNION of MAPs/RECORDs,
OR it is the root element, and there can only be one of those.
Muddling through how to build a path through a schema based on only
element names.  Much more work necessary.

Learned that the ArrayList.remove(int) method returns the item that was
previously at that index.  So there is no need to call
ArrayList.get(int) directly before calling remove().  Correcting all
instances of that.  All tests pass.