Build both Python 2 and Python 3 bindings

If both Python 2 and Python 3 are found, then build bindings for both of
them during the build process.  Currently, one version of Python is
detected automatically, and building for the other requires changes the
CMake config.

The largest chunk of this change generalizes OpenCVDetectPython.cmake to
find both a Python 2 and Python 3 version of Python.  Secondly, the
opencv_python module is split into two modules, opencv_python2 and
opencv_python3.  Both are built from the same source. but for different
versions of Python.
Merge branch 'master' into python2and3
Reference PYTHON_NUMPY_INCLUDE_DIRS not PYTHON_NUMPY_INCLUDE_PATH

PYTHON_NUMPY_INCLUDE_PATH was a typo, it should have been
PYTHON_NUMPY_INCLUDE_DIRS.
Double precision for solvePnPRansac()
world fix
make distrib with world (shared libs)
Merge branch 'master' into python2and3
Fix a few more PYTHON_NUMPY_INCLUDE_PATH

The previous commit fixing references to PYTHON_NUMPY_INCLUDE_PATH
missed a few unset()s.
Place Python library out in dedicated folder

Place the built Python module library in a dedicated folder inside of
lib/.  This ensures that even if the Python 2 and Python 3 module names
conflict, they will not overwrite one another.
Merge pull request #3039 from alalek:ocv_world
Merge pull request #3037 from PhilLab:pnpPatch
Add opencv_matlab to Python ignored modules

Requested by @vpisarev in #3047.
Build Python 3 bindings in subdirectory

Build the Python 3 cv2 module in lib/python3/, to avoid potential naming
conflicts with the Python 2 bindings.

The Python 2 bindings are placed directly in lib/, where they are
required for the Buildbot to successfully execute the Python tests.
Support Python 2 and 3 in test script

Add Python 3 support to the Python test.py script.

The print function is used in place of the print statement.

The urlopen function has been moved to urllib.request in Python 3, so
attempt to import it from either location.

TestCase.assert_() has been deprecated in place of
TestCase.assertTrue().

The tests all pass in both Python 2 and 3.
Merge branch 'master' into python2and3
Merge pull request #3054 from zillatrooper:master
Merge pull request #3047 from prattmic:python2and3