FiniteStateMachine.deepcopy: additional doctest

In order to make sure that the deepcopy mechanism
preserves the links between states and vertices,
added another doctest.
FiniteStateMachine: fix one more occurrence of raise E, ... (cf. #15990)

introduced at the same time
FiniteStateMachine._latex_: replaced inefficient code

Previously, a O(n^3) code was used in latex; this is now
O(m). This resulted in a reordering of the output of _latex_,
so doctests had to be adapted.
FiniteStateMachine: rewritten code after #16067

When re-reading the resulting code, some simplifications were made.
Merge remote-tracking branch 'aau/fsm/deepcopy_doctest' into fsm/code-cleanup-post-16067
trac #16580: use OrderedDict instead of dict to have non-random output

In http://trac.sagemath.org/ticket/16580#comment:3 it turned out that
the order of the output of the transitions in _latex_ seems to be
architecture-dependent. While this has no relevance for the actual
latex output, it is annoying for doctests.

Therefore, we now use an OrderedDict instead of a dict in order to
output the transitions ordered by the labels of the states.

Consequently, the order of some transitions in four doctests had
to be permuted to fit to the new output.
trac #16580: only use integer labels in doctests for latex_options

As the comparison between integers and strings tends to be random, the state 'I' in the sample transducer has been renamed to 4. Thus sorting of states (and therefore of transistions) should now be well-defined.
Merge commit '1bfb513ca3a9dc11a232bdd6ee31625fe5822572' (#16557) of trac.sagemath.org:sage into fsm/code-cleanup-post-16067

Merged in order to avoid merge conflict with develop

Resolved conflicts:
	src/sage/combinat/finite_state_machine.py
Added a CartesianProduct category for groups.
Changes and copied over to monoids as well.
Added a TODO message.
Fixed doctests in groups.py.
trac #16727: IncidenceStructure.__contains__
trac #16727: Moloch! Time Eater!
Merge branch 'develop' into public/groups/cartesian_product_category-16718
Added test for infinitely generated groups.
Changed finiteness test.
Added test for lists/tuples for finitely generated.
Fixed trivial failing doctests.
Micro-optimizations to the *_generators.