Add the dtw algorihtm.

This is a naive implementation of the dynamic-time-warping algorithm.