This patch simplifies the curve object to mesh conversion used by the
object convert operator and exporters.
The existing code had a convoluted model of ownership, and did quite a
bit of unnecessary work. It also assumed that curve objects always
evaluated to a mesh, which is not the case anymore.
Now the code checks if the object it receives is evaluated. If so, it can
simply return a copy of the evaluated mesh (or convert the evaluated
curve wire edges to a mesh if there was no evaluated mesh). If the
object isn't evaluated, it uses a temporary copy of the object with
modifiers removed to create the mesh in the same way.
This follows up on the recent changes to curve evaluation,
namely that the result is always either a mesh or a wire curve.
The new code works in my own testing, and the automated tests
pass as well.
Fixes T91445