Parallelize building kmeans index in flann

I improved k-means index in flann module by parallelize computing distances between datas and centers. It would be great if you have a chance to review and merge it. Thanks!
maybe it's better to share `converged` variable between threads and update it in a critical section (you can use `cv::Mutex` for this purpose). In this case we don't need the second loop and excess buffer `updated`.