In AlgorithmCore::compare, use setPropertyRecursive to set the gallery

This avoids the need for the arguments of GalleryCompare and other
gallery comparison style transforms to be precisely aligned.

Update some brace placements.