Prepare Downhill Simplex for pull request

This is an implementation of so-called downhill simplex method
(https://en.wikipedia.org/wiki/Nelder%E2%80%93Mead_method)

Please, let me know if you have any comments, whoever you'd be.
Removed trailing spaces

This caused warnings.
Removed trailing spaces

Continuation of work done in previous commit.
Fixed .rst indentation

This caused warnings.
Minor fixes

In response to the pull request comments by Vadim Pisarevsky. In
particular, the following was done:
    *)cv::reduce use instead of custom code for calculating
per-coordinate sum
    *) naming style of private methods is made consisted with overall --
mixed-case style
    *) irrelevant create()'s were removed -- I did not know that copyTo()
method itself calls create
Update on LSD no to use any Mat* (IOArrays instead).
Updated to new license.
Added LineSegmentDetector documentation and an output image.
Removed IOArray constness.
Update on the compare lines method.
fixed a bug in the non-max-suppression filter procedure
fixed a typo error in the default min_Probability param of CreateERFilterNM2
fixed a bug in the calculation of the number of inflexion points feature
better classifiers performance by training them with a new dataset of "manually" selected regions
better parameter settings for the ERFilter sample
removed trailing whitespaces
removed unnecessary commented block
removed blank line at EOF
fixed compilation issues with new Ptr
fixed rebase conflicts
changed default parameters in CreateERFiltersNM{1,2} functions. They are not needed now in the sample example.