Updated fix for OpenCV bug #3172:

Also changed _dist parameter of cv::batchDistance to InputOutputArray
to indicate that the method can be called repeatedly to update an
already preinitialized array of knn distances.

http://code.opencv.org/issues/3172