Partly a cleanup, but also iterating over spans can be faster than linked lists. Also rewrite the multi-input socket link counting to avoid the need for a temporary map. Overall, on my setup the changes save about 5% (3ms) when drawing a large node tree (the mouse house file).