Fixed issue 3323

Implemented the resolution proposed by Aaron in the discussion
of the issue on the google code website:
http://code.google.com/p/sympy/issues/detail?id=3323
added another test for tr on density op of spin states
style changes
Expr.expand: Always iterate the hints in the same order.

This means that, instead of directly iterating the dictionary,
Expr.expand now iterates the sorted list of keys.  These assures the
same order of invocation of _eval_expand_* functions.
meijerint_definite: Canonically sort the innermost points in reverse order.

This change seems to assure that meijerint_definite always returns the
simplified result.  Without this sorting, meijerint_definite would
return either the simple result, or a long expression which would
simplify to the same result.
LambdaPrinter: Sort .args before printing.

This avoids the dependency on the order in which the elements get into
.args.  This commit also fixes test_lambdarepr.py correspondingly.
_sqrtdenest0: Sort the .args before processing them.

This assures that this function always returns the same result.
matrices: Always sort the eigenvectors.

Also correct the tests according to the new values.
function.expand: Mention that hints are sorted by keys.

Expr.expand consecutively applies the corresponding methods to one and
the same instance of Expr, which makes the result actually dependent on
the order in which these methods is applied.
split_surds and _sqrtdenest1: Sorts .args before traversing them.

Unfortunately, different order of traversal yields different results
which, hopefully, are of the same level of notational complexity,
because commits such as this one fix only one of the possible results.
LambdaPrinter: Don't sort the arguments of Piecewise.

I have previously authored a commit in which I altered all
LambdaPrinter._print_* methods to sort the .args of their arguments.
This has resulted in nonsensical output for Piecewise, in which the
order in which the conditions were specified matters.  This commit
reverts the change to _print_Piecewise, but leaves the sorting intact in
_print_And and _print_Or.
PrettyPrinter: Add argument sort=False to _print_Function.

This commit makes the pretty printer sort the arguments of commutative
boolean functions.
LatexPrinter: Always sort the arguments of Min and Max.
function.expand: Further fix the docstring.

The docstring still contained a mention of hints being applied in
arbitrary order.
Update the docstring of expand()

Hints are now applied in a canonical order, but that order is still arbitrary,
because, even though they are applied alphabetically at the top level, the
actual order depends on expand being called recursively.
Revert "matrices: Always sort the eigenvectors."

This reverts commit 18ed0a44b9791fbbbd0b108680133bb3db130735.
edit expand docstring
Removed alt_or_sym from sympy.combinatorics.perm_groups

After the discussion here: https://github.com/sympy/sympy/pull/1422
it seems that the functionality of alt_or_sym is too simple and
such a function is not really necessary.
Merge pull request #1427 from smichr/rand

edited version of 1395
Merge pull request #1422 from amakelov/fix-3323

Fixed issue 3323