Added Hausdorff distance

Added function for calculating Hausdorff distance (I think), and
cleaned up the code a little.
Now uses Hausdorff distance as the meaning similarity metric