trac 13255: replace some deprecated python functions in sage/misc
Merge branch 'develop' into py3_misc

Conflicts:
	src/sage/misc/functional.py
	src/sage/misc/random_testing.py
	src/sage/misc/sage_extension.py
Merge branch 'develop' into py3_misc

Conflicts:
	src/sage/misc/randstate.pyx
	src/sage/misc/session.pyx
Merge remote-tracking branch 'origin/develop' into py3_misc
Added test case to expose the segfault of discriminant.
Drive-by fix to TeX notation in docstring.
Use simple coefficients if base is multivariate polynomial.

If the base ring is a multivariate polynomial ring, then the discriminant is
now computed in two steps.  First all non-zero coefficients of the
polynomial are replaced with variables, and the discriminant is computed
using these variables.  Then the original coefficients are substituted into
the result of this computation.  This should be faster in many cases,
particularly with big coefficients.  In those cases, the matrix computation
on simple generators is a lot faster, and the final substitution is cheaper
than carrying all that information along at all times.
Compute discriminant of power series polynomial using substitution.

While other tickets care about making the resultant more flexible, to allow
its operation on polynomials over power series, for the special case of the
discriminant the substitution is certainly a viable and fast alternative.
Merge remote-tracking branch 'origin/develop' into py3_misc

Conflicts:
	src/sage/misc/interpreter.py
Merge remote-tracking branch 'origin/develop' into py3_misc

Conflicts:
	src/sage/misc/dev_tools.py
	src/sage/misc/latex.py
	src/sage/misc/package.py
	src/sage/misc/preparser.py
	src/sage/misc/sagedoc.py
new bahaviour if .process and .__call__
Deprecation-Warning added
warnings added; FSMOldOutputProcess documented
activated old output of process and added "FSMOldProcessOutput=False" to relevant doctest
FiniteStateMachine.is_complete: new method.
TransducerGenerators: New class, collecting common transducers

Inspired by the (Di)graph_generators, provide a class
TransducerGenerators where commonly usable transducers
performing simple tasks can be collected. As for graphs,
an abbreviation transducers is injected in the global
namespace by a lazy_import.

To start with, there is a Identity transducer and
a CountSubblockOccurrences transducer.
Merge remote-tracking branch 'origin/develop' into py3_misc

Conflicts:
	src/sage/misc/test_class_pickling.py
	src/sage/misc/unknown.py
corrected docstring of is_complete
minor corrections
finite_state_machine.process: Minor changes

Removed full_output from FiniteStateMachine.process, Simplified if/else doing the same, Added doctests, Corrected typos.