avoid string version comparisons in external.qt

We have learned from pyzmq that one should *always* parse version strings before comparing them.
utils.localinterfaces: Uniquify LOCAL_IPS

On my Python 3.2.3 system, I get:

  >>> socket.gethostbyname_ex('localhost')
  ('localhost', [], ['127.0.0.1', '127.0.0.1'])

After de-duplicating, LOCAL_IPS[1] (if it exists) will be a non-local
IP address that might be useful to a remote host (it might also be
'0.0.0.0', but I'll worry about that later).
utils.localinterfaces: Add PUBLIC_IPS to consolidate socket logic

Consolidating IP detection in this module will let us remove
socket.gethostbyname_ex calls from other modules and ensure that
everyone agrees on what our public IPs should be.
parallel.apps.ipcontrollerapp: Use utils.localinterfaces

... for LOCALHOST and PUBLIC_IPS, rather than duplicating the socket
incantation and hard-coding 127.0.0.1.
frontend.html.notebook: Use utils.localinterfaces.LOCALHOST
parallel.util: Use utils.localinterfaces

... for LOCALHOST and PUBLIC_IPS.
parallel: Use utils.localinterfaces.LOCALHOST
add version comparison utility
    
all version strings are comparable by casting string elements to float('inf')
use NumericalVersion utility in external.qt
add check_version utility

using LooseVersion and explicitly catching TypeError, rather than the NumericalVersion subclass.
remove unused NumericalVersion
Correct docstring of ipython.py

The script installed by setup.py is auto-generated by distutils.

Fixes #2858.
setuptools has console_scripts, not distutils
Merge pull request #2831 from minrk/qtversions

avoid string version comparisons in external.qt
Merge pull request #2859 from asmeurer/installed_script

Correct docstring of ipython.py

had archaic reference to script location.

closes #2858
Merge pull request #2850 from wking/localinterfaces-localhost

Consolidate host IP detection in utils.localinterfaces

This PR replaces a number of hard-coded 127.0.0.1 references with
LOCALHOST, and consolidates the computation of LOCALHOST,
LOCAL_IPS, and a new PUBLIC_IPS in the localinterfaces module.

It's unclear to me when LOCALHOST would not be 127.0.0.1. I suppose
you could have another IP in the 127.0.0.0/8 block, or a IPv6 address.
It may also be possible to not have a loopback interface at all. In
that case it's possible that we need a LOOPBACK variable in
utils.localinterfaces which is a valid loopback interface or None, so
that consumers can differentiate between generic IPs pointing back to
the local host and the loopback interface.
declare data attr in MockSocket

setting attrs not declared at the class level will be illegal in pyzmq ≥ 3
bump minimum pyzmq version to 2.1.11

and remove the associated workarounds for old pyzmq
add missing KernelManager to ConsoleApp class list
Merge pull request #2861 from minrk/missing_km

add missing KernelManager to ConsoleApp class list

closes #2860