Use predetermined sequences instead of seeds in circuitutils tests

This fixes issue 3282, and is an alternative to pull request #1364.
Fix automatic symbols (isympy -a) to work with IPython 0.13

This also fixes a test failure (issue 3293).
Provide a docstring for element_sort_fn in sympy.core.sets.

While the meaning of element_sort_fn is quite clear after looking at the
code of FiniteSet, the fact that to understand it one has to look in a
different place may be misleading, therefore, a proper docstring is
welcome.
Merge pull request #1367 from asmeurer/auto_symbols_fix

Fix automatic symbols (isympy -a) to work with IPython 0.13
Merge pull request #1349 from smichr/2to3

use2to3 mods (replacing #726)
Merge pull request #1366 from asmeurer/circuitutils

Python 3.2 failure fix: Use predetermined sequences instead of seeds in circuitutils tests
Merge pull request #1371 from scolobb/element_sort_fn-docstring

Provide a docstring for `element_sort_fn` in `sympy.core.sets`.
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
Fix return value of _doctest
Make run_in_subprocess_with_hash_randomization() return False instead of None

Sometimes subprocess.call() can return None, so that value is already used.
Add a note about architecture and hash randomization to the test() docstring
Don't sort the elements of a FiniteSet.

This reduces the performance of the constructor of FiniteSet and is not
compliant with the definition of a set in the first place.
Reset PYTHONHASHSEED after running the tests or doctests

This way, it will be as it was for the outer Python process (the one that
creates the subprocess).  Without this, running more than one test (e.g., the
tests and then the doctests) would not work after the first one, because the
later ones would think that the seed was already set and not spawn a
subprocess.

Note that as a result of this, each test/doctest will have a separate hash
seed.
Make str.py and latex.py print FiniteSet in a sorted way.

The printer in pretty.py already sorts FiniteSet's, therefore no changes
are necessary in that printer.
Explicitly define FiniteSet._hashable_content.

Previously, FiniteSet would rely on Basic._hashable_content, which
returns .args.  FiniteSet would construct .args by frozensetting the
arguments it would get.  Apparently, this does not guarantee that
FiniteSet's constructed from the same elements will eventually have the
same .args, i.e., the order may change.  This commit makes FiniteSet
return the frozenset of its original args, wrapped in a tuple.  This
assures that two FiniteSet's with the same elements are equal (because
the corresponding frozenset's are equal), and keeps _hashable_content a
tuple.