Added cost matrix to edit distance.

The edit distance function now accepts a cost matrix. A function for
loading the cost matrix from a file has been added to the pronunciation
transformation code.