* Fix mesh_copy_data setting the subd wrapper type without copying the
associated tessellated mesh. It's unclear if this currently causes any
issues, but with future changes it would crash.
* Use double checked lock to avoid mutex locks on every call to
BKE_mesh_wrapper_ensure_mdata and BKE_mesh_wrapper_ensure_subdivision.
* Set wrapper type to subd also if subdivision was skipped due to bad
topology or level set to zero. Previous it would do mutex locking and
TBB task isolation on every function call.
* Add assert when BKE_mesh_wrapper_ensure_mdata changes the wrapper type
from subd to mdata. This doesn't really make any sense, it just loses
the subdivision detail. If any code relies on this we need to understand
why and maybe change it.
Pull Request: https://projects.blender.org/blender/blender/pulls/135895