Clean up redundant images

Finds images ending with three parts delimited by “.” and switches
nodes using them to use only the first two parts, then unlinks any
images not used in a node.