The algorithm that traverses UV is a bit complex and is being iterated a lot in different areas of the code. This commit deduplicates this code by creating a foreach UV function. At the moment only the `uvedit_ops.cc` file uses this function but similar cleanups can also be done on many other files that use UVs.