The existing behavior of the grid fill operator requires a loop of
boundary or wire edges to be selected. This algorithm tries to fit a
grid of quads into the edge loop. It also works if you select two of the
four 'rails' of an edge loop.
This new behavior allows running grid fill after selecting faces.
If the algorithm sees that a set of faces are selected, it separates
all the faces, and then attempts to grid from their exterior boundary
using the exact same logic it normally uses for interior boundaries.
This all assumes the user has selected a set of faces with an outside
border that works with grid fill. (has one clear exterior loop with an
even number of edges) If not, grid fill will halt, and notify the user
of the error, exactly the way that it already did before.
Once the grid fill is complete and successful,
the existing faces which were replaced get deleted.
UVs (including at UV island boundaries) are interpolated properly,
as are custom-data on verts, edges, faces, and face corners.
At the edges of the selection, the edges/faces/face corners that are
selected contribute, but the custom-data outside the selection does not.
This also resolves non-deterministic behavior.
The previous behavior of `edbm_grid_fill_prepare` found the vertex with
the largest angle, then walked the edge loop until it found one out of
the three best remaining corners. This established one edge of the grid
area, and the second edge was found by symmetry.
However, the direction that the algorithm walked the loop
(and therefore which second corner was found) was essentially arbitrary.
The new behavior first finds the vert with the largest angle,
then finds the vert with the second largest angle,
(after excluding the diagonally opposite corner from the first vert),
and selects the edge between those two verts.
Ref !129318.