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.
Fixed MATLAB bridge

MATLAB bridge.hpp was missing definition for Ptr<DenseOpticalFlow>
Merge branch 'master' of https://github.com/Itseez/opencv
DownhillSolverImpl::innerDownhillSimplex something looks broken here:
Mat_<double> coord_sum(1,ndim,0.0),buf(1,ndim,0.0),y(1,ndim,0.0);
nfunk = 0;
for(i=0;i<ndim+1;++i)
{
y(i) = f->calc(p[i]);
}
y has only ndim elements, while the loop goes over ndim+1
Unroll pyrUp kernel
Removed useless multiplication by 4
Updating missed defines in documentation

Updating missed defines in documentation. The new defines (in imgproc.hpp) state they have a prefix of COLOR instead of CV.
fix typo in linux tutorial
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
optimized cv::warpAffine
Updated and added haarcascade_mcs*.xml files
minmaxloc
optimized cv::norm with NORM_INF
fixed calculation method of "cv::TickMeter"
optimized cv::norm with 2 args
optimized cv::norm with NORM_RELATIVE
fixes