Simplify IPython detection logic.
Merge pull request #1214 from ContinuumIO/hotfix/ipython_versions

Simplify IPython detection logic.