Merge branches 'fsm/quotient-deepcopy-state' (#15847) and 'fsm/moore-non-deterministic' (#15848) into fsm/on_duplicate_transition
new hook on_duplicate_transition

Previously, when inserting a transition which is already present, this was simply
ignored. By providing a hook on_duplicate_transition, user defined behaviour is
now possible. As examples, three functions are provided (the default ignore, maintaining
the previous behaviour; raise error or add input label). The latter may be used to
model a Markov chain where the input labels are interpreted als transition probabilities.
New Doctest for failing simplification when duplicate_transition_add_input is used.
FiniteStateMachine.quotient() allows on_duplicate_transitions

Previously, on_duplicate_transition led to missing transitions in .quotient,
the corresponding check has now been improved.
added one TODO in projection
Merge branch 'fsm/quotient-deepcopy-state' into fsm/on_duplicate_transition

* fsm/quotient-deepcopy-state:
  corrected spacings (PEP8); added line-breaks in long lines

Conflicts:
	src/sage/combinat/finite_state_machine.py
corrected spacings (PEP8); rewrote long line
Merge branch 'fsm/moore-non-deterministic' into fsm/on_duplicate_transition

* fsm/moore-non-deterministic:
  small changes in docstring of _minimization_Moore_
  docstring in quotient adapted to the same style as equivalence classes
  description of equivalent states rewritten

Conflicts:
	src/sage/combinat/finite_state_machine.py
Merge branch 'fsm/quotient-deepcopy-state' into fsm/on_duplicate_transition

* fsm/quotient-deepcopy-state:
  using relabeled instead of deepcopy (former TODO)
corrected spacings (PEP8); rewritten long lines; corrected typos
on_duplicate_transition=None as default
inserted "parameter" in docstring of on_duplicate_transition_...
Parallelized all_rational_preimages function

Parallelized all_rational_preimages function in sage/schemes/projective/projective_morphism.py.
Used parallel_iter from sage.parallel.multiprocessing_sage.
Trac 15931: implement a proper hash function for (combinatorial) free module elements
Trac 15931: add a @cached_method on the new hash function for (combinatorial) free module elements
Trac 15931: include the hash of the parent in the new hash function for (combinatorial) free module elements
Parallelized possible_periods function

Parallelized possible_periods function in sage/schemes/projective/projective_morphism.py.
Used parallel_iter from sage.parallel.multiprocessing_sage.
Fixed paralleization of all_rational_preimages

Fixed paralleization of all_rational_preimages in sage/schemes/projective/projective_morphism.py
Added documentation about added functionality in this patch.
Tests on file no longer work because parallelization returns in random order.  Therefore, the results are correct, but do not always in order of the file.
Trac 15931: fix the doctests for the new hash function for (combinatorial) free module elements to be reproducible
    Trac 15931: do not include the hash of the parent in the new hash function for (combinatorial) free module elements after all; see #15959