Merge 2.4 into master

Original pull requests:

* #2016 from pemmanuelviel:kmeansppSquareDist
* #2544 from alalek:perf_report_regressions

Wow, we're having a drought here.