This function does two rounds of insertion. First, it inserts a point on each path whenever path1 intersects path2. Next, it optionally inserts points on segments of one path that are 'opposite' points on the other path, to allow a monotonic mapping between the two paths.