pyflakes cleanup of combinatorices
Fix the errors in the Fresnel example notebook
Updated Fresnel Integral examples notebook
Merge pull request #1548 from smichr/pyflakes

pyflakes cleanup of combinatorics
Merge pull request #1551 from raoulb/fix_fresnel_notebook

Fix the errors in the Fresnel example notebook
    process sets in canonical order

    Sometimes it is desirable to keep track of elements processed with a set and quit
    processing when all elements have been handled. An problem with iterabting over
    a set, however, is that there is not a guarantee that the items will be processed in
    the same order each time on all systems. So a ad-hoc idiom for an ordered set is used:

    s = sorted_items
    S = set(s)
    for si in s:
        ...
        S -= foo
        s = [i for i in s if i not in foo]

    - perm_groups
        use the above idiom and remove the rep=True option as this is unused in SymPy

    - prufer
        slight modification to handling of missing indices in error reporting sections

    - dpll2
        a set was being used but the only thing that is used is the length, so a list
        is used instead

    - factortools
        use the above idiom for processing the items of a set in canonical order
Merge pull request #1558 from smichr/oset

process sets in sorted order
Copy sympyprinting.py from IPython
Get printing extension working from within sympy

Since the extension has been moved from under IPython control to being
under SymPy control, the extension is renamed to ipythonprinting.py.

The imports have been changed to work from within SymPy, rather than
from within IPython. A notable change is that using this extension now
requires IPython to be importable from SymPy (where before SymPy needed
to be importable from IPython).
Track loading of sympyprinting with IPython extension manager

Updated sympyprinting IPython extension to use the IPython
ExtensionManager tracking of loaded extensions to ensure the extension
is not re-loaded, rather than using a global variable.

This is introduced in IPython pull #2462 [1]. Support for using a global
variable is maintained for older versions of IPython.

[1] https://github.com/ipython/ipython/pull/2462
Pretty print MutableMatrix in IPython

Allows sympyprinting to render the new matrix default matrix class,
MutableMatrix.

Fix found by @jenshnielsen [1].

[1] https://github.com/ipython/ipython/pull/2430
Change checking of MutableMatrix to MatrixBase
Move sympyprinting logic to sympy.interactive

Move the logic used in the sympyprinting IPython extension into the
sympy.interactive module.
Move sympyprinting extension to ipythonprinting

Rename the sympyprinting extension to ipythonprinting and move the
extension from utilities to interactive.
Fix Matrix latex rendering using ipythonprinting
Add latex rendering option to init_printing

Add options to control the rendering of latex in the qtconsole and
notebook when using init_printing or init_session to get pretty printing
in IPython.
Fix mishandling of unicode/ascii for tests
Fix ipythonprinting in qtconsole and notebook

Fix latex and unicode rendering in the qtconsole and notebook while
maintaining unicode behavior in the terminal. Also, document the usage
of the module.
Fix testing error when IPython not installed
Change init_printing to detect when in ZMQ shell

When in a ZMQ shell, i.e. when in the Qt console or the notebook, set
the unicode and latex keywords to True if they were set as None (the
default value).