final glue to make X also join first and last vertex

X performs either closing Bridge (for gaps)  or merges last vertex with
first vertex if they are within tolerance distance. Experimental, but
seems to work under my own testing.