Add Abs.rewrite(Heaviside)
Fix error message from subs
Abs.rewrite(Heaviside) only happens if the argument is real
Merge branch 'master' into abs_heaviside

Conflicts:
	sympy/functions/elementary/tests/test_complexes.py
trigsimp traverses not only function but any Basic objects.

now this works:
In [1]: trigsimp(Subs(x, x, sin(y)**2+cos(y)**2), deep=True)
Out[1]: Subs(_x, (_x,), (1,))
In simplify call trigsimp(deep=True)
	Basic groups, orbit calculations, direct product, minor fixes

	Implemented constructors for symmetric, cyclic, dihedral and
	alternating groups as permutation groups, setting their
	basic properties.

	Replaced some of the orbit/stabilizer functionality present -
	the functions orbit, stabilizer, orbit_transversal - with faster
	implementations. Implemented Schreier vectors and
	group elements sending a given element to another element in
	its orbit.

	Implemented direct products for permutation groups.

	Made minor fixes in the docstrings and removed some duplicate
	functionality from permutations.py.
	Product replacement algorithm

	Implemented the product replacement algorithm for
	finding random elements in black box groups in the
	case of permutation groups, following the suggestions of
	"Handbook on computational group theory", pp.69-71
	Alt/Sym testing

	Implemented a Monte Carlo algorithm for fast testing
	whether a given group is the symmetric or alternating
	group. Random group elements are generated by the product
	replacement algorithm with the modification of Leedham-Green.

	Also, made some little optimizations on the constructors
	for Symmetric/Alternating groups so that the order is not
	calculated at initialization but when neede.

	Removed some checks from the Permutation constructor in
	order to speed it up.
Implemented Atkinson's algorithm
	Primitivity testing

	Primitivity testing in O(n^2) time where n is the degree
	of the permutation group, using Atkinson's algorithm
	following [1].

	A randomization used for quick generation of a large
	subgroup of point stabilizers is used to speed up the
	algorithm.

	Minor improvements/fixes in some of the previous algorithms.

	[1] "Handbook on computational group theory"
trigsimp cleanup
Merge branch 'master' into abs_heaviside
	Docstrings, tests, minor fixes, named groups

	Improved the docstrings for the new functions
	introduced.

	Moved the functions creating
	symmetric, alternating, dihedral, cyclic groups
	to a separate file at the suggestion of
	D. Joyner (more named groups to be added later).

	Added tests for randomized algorithms.
Run doctests in Travis CI as well
Merge pull request #1373 from certik/travis

Run doctests in Travis CI as well
Forward the `deep` kwarg to the helpers inside trigsimp.
Merge pull request #1374 from Krastanov/trigsimp_deep

Minor improvements in trigsimp
Add function run_in_subprocess_with_hash_randomization to runtests

This function will facilitate running the tests with hash randomization
enabled with a specific seed.  In order to do this, tests must be run in a
separate subprocess, because the only way to set the seed is to set the
environment variable PYTHONHASHSEED before starting Python.
Run tests and doctests in a subprocess in order to seed hash randomization

This is necessary to do because the seed for hash randomization cannot be
determined at run time unless it was explicitly set using the environment
variable PYTHONHASHSEED when the Python process started.  A new subprocess is
started only for those Python versions that support hash randomization.  Hash
randomization was added in the minor Python versions 2.6.8, 2.7.3, 3.1.5, and
3.2.3, and is enabled by default in all Python versions after and including
3.3.0.

Starting a new subprocess can be disabled by passing the --no-subprocess flag
to bin/test or bin/doctest.  This will also prevent hash randomization from
being enabled in Python 2.6, 2.7, 3.1, and 3.2, unless Python is started with
the -R flag or the environment variable PYTHONHASHSEED is set.

To run the tests with a specific random hash seed, use

$ PYTHONHASHSEED=42 python setup.py test