Fix for (Bug #2789)

Add MatlabFormatter for matlab style output.
See http://code.opencv.org/issues/2789
Merge branch 'master' into matlab_formatter
cv::findContours: Check if type of output data structure is right to store contours (vector<vector<Point>>).
Fixed scanning bug identified in comments in pull request #1119.
NFA calculations now generate better line segments.
Unroll pyrUp kernel
Removed useless multiplication by 4
Issue #3709 - PyBindings for LSD

Corrected crashing in Python bindings while using LSD_REFINE_NONE flags
Corrected not drawing lines in drawSegments and compareSegments in Python bindings
some optimizaions of cv::pow
optimized cv::calcHist
eliminated convertTo
optimized histogram merging
cv::equalizeHist
used built-in functions
used abs
used abs in reduction operations
Bugfix: Memory leak in deletion of er_stack nodes of ERFilter.
Removed "CV_" prefix from constants in docs

The `calib3d.hpp` has a definition of the constant that does not contain the prefix "CV_".
The affected methods were `findHomography` and `findEssentialMat`.
Now the documentation updates the definition of the constants to conform to the header.
Don't build CUDA modules stubs by default (use `-DBUILD_CUDA_STUBS=ON` if need them)
optimized cv::boxFilter
optimization of cv::warpAffine INTER_CUBIC