Update algorithm serialization

Rather than saving the Transform and distance strings of an algorithm
together, in stored files, save the transform and distance descriptions
separately. Also introduce an enum allowing for the serialization of
algorithms which use gallery comparison transforms, rather than distances
as their comparison function.

Update pre-trained algorithms, this only requires updating the algorithm
files themselves, transforms saved via LoadStore are unaffected.