Handle xpassing tests in test_failing_integrals.py

* Exact or nearly-exact duplicate of a test in
  test_integrals.py: 459, 841, 1001, 1116, 1304, 1394, 1418
* Otherwise tested already: 1020, 1127, 1323, 1576, 1768,
  1791, 1793
* Added to test_integrals.py: 1323, 1604, 1888
Use @slow instead of manual timeouts

Also mark 1851 as slow.
Merge pull request #1625 from rlamy/risch-cleanup

Post-merge cleanup of the Risch branch
shorten long error messages; remove cruft line
edit iterable and is_sequence docstrings
add oset to compatibility
add convenience keys for laszyDSU_sort
1400: cse is deterministic and ignores singleton expressions

deterministic

Since cse relies on making substitutions at the very beginning
in the preprocessing, and substitution is an order-sensitive proceedure,
it was necessary to sort the Adds that are being identified in that
process.

The use of default_sort_key from the traversal was removed. This is not
needed in the sub-expression identification stage. The insert method
that sought to keep the expressions in order was also removed. The
default_sort_key applied in one branch of the expression tree in one
of the expressions given to cse doesn't guarantee that another expression
with the same key (as was defined in the insert method) will be in a
deterministic order -- the tie would not be broken.

So now all the expressions are collected however they come from the
tree and are assembled in set. These (and the Add and Mul terms that
are handled individually) are sorted with the lazyDSU sort which seeks
to put the items in some canonical order. This is the source, then,
of determinism in the method.

In addition, expressions that are only used once are no longer reported
in the returned expressions, e.g. whereas one might have gotten
[[(x0, x+1)], [cos(x0)]] perviously, now [[], [cos(x + 1)]] will be
returned.

The insert method used to keep the expressions arranged in a particular
order was removed since more than this is
move sorting functions to compatibility

In addition, the traversals are capable of a lazy sort
which should be faster when ties can be broken with a simple
count_ops comparison.
3460: watch for oo in ndiv

By watching for extractable negatives at the outset, the
problem can be circumvented. I'm not sure where the infinities
are being generated by such a simple substitution as
(-12*x).subs(-x,1).
3459: watch for nc during expansion

In addition, if something has a polar=False assumption, this doesn't
mean that it is a negative number, so None is returned if polar is False
in the sifting of arguments.

Tests were added to bring the coverage of Pow._eval_expand_power_base to
100%.
import cleanup and docstring example added
fuzzy_not with other fuzzy_foo; tweak fuzzy_bool

There were two fuzzy_nots; now there is one and all the fuzzy_foos
are in core.logic.

fuzzy_bool was optimized a bit to take advantage of the
current behavior of equality and is-checking being faster
than calculating the bool:

from timeit import timeit as t
>>> t('1 == True')
0.17005395889282227
>>> t('1 is True')
0.12167119979858398
>>> t('bool(1)')
0.3265230655670166
>>> t('bool(True)')
0.3634920120239258
args_cnc has flag to not split -1 from Number
3462: unification of _eval_power and _eval_expand_power_base

This is something that was sorely needed: much code was being duplicated
(incompletely) between Pow._eval_power and Mul._eval_expand_power_base.
The best of both has now been consolidated under Mul so it is now much
easier to maintain and to see what is part of auto-expansion in Pow and
what is not.

While working on this I realized that powers that weren't strictly Rational
could still allow separation of the bases and made that change in
simplify, too.

The test that was changed in arit was tested at Wolfram Alpha:
http://tinyurl.com/8vsbhzs
consolidate expand tests
Mul.flatten fix

It was assumed that only things like 2*sqrt(3) might be encountered;
with the changes that have been made, it is now possible to get
things that have more terms, so now provision is made for that.
fix powdenest test

fix meijerint test for simpler expression

fix cse test

Caution: sometimes you really should use type(foo) is bar rather
than isinstance(foo, bar). e.g. isinstance(foo, int) is true for
foo being 2 or False whereas type(foo) is int will be true only for the
2.
pyflakes minor cleanups
add permutations to iterables imports
determinism for trigsimp; use small_first_keys in solve

Now that cse is deterministic, trigsimp (which used it) is, too.