added shape-mask alignment metric

Implmeneted a function which measures shape to probability image (or
mask) aligment (or goodness), and a corresponding test function.