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
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.
restored original behaviour or release functions for (Buffer and Texture)
removed detail:: prefix int video_reader

it conflicts with cv::detail
Merge pull request #1403 from lluisgomez:scene_text_detection_NM_fix
Merge pull request #1408 from jet47:new-ptr-fixes