is there a way to merge anchor based on a distance? Blender has a mesh clean up command that allows it to eliminate points that have a small distance between them. Does Illustrator have something similar, or Inkscape? Here are some images illustrating two scenarios where something that executes a "merge or 'collapse' by distance" would be useful.
There is an extetion what can do that for you http://cutlings.wasbo.net/remove-duplicate-nodes/
Some non-automatic methods:
In Inkscape you simply delete a node and Inkscape redraws the path as well as possible with the reduced number of nodes. It doesn't work in Illustrator.
The 3 double point case is different. I guess you want to convert the long and narrow area surrounded by a closed path to an equally long open path. That also needs manual crafting. You must open the paths in the visual endpoints and delete one of the separated paths.
In theory you can get literally what's asked by applying the offset path effect in Illustrator to the 3 double point case, but I guess it's only asked, not wanted. It would still be a closed path.