Fix duplicate shape key import when the FBX connections are duplicated
Rarely, FBX files with duplicate ShapeKey-related connections are
encountered. The FBX IO addon would add a ShapeKey for each duplicate,
however external software appears to ignore the duplicates, or
overwrite the existing duplicates such that the same effect as ignoring
new duplicates is achieved.
This patch modifies the FBX importer to skip all duplicate ShapeKey-
related connections when finding the ShapeKeys to add to each Mesh.
While it is unclear if they are ever encountered, importing multi-user
Shapes/BlendShapeChannels/etc. as single-users remains supported, e.g.
a Mesh with a BlendShape with two different BlendShapeChannels that both
have the same Shape will still import that Shape as two separate
ShapeKeys.
The code needed for iterating through each type of connection was
duplicated and was getting rather large with the newly added code, so
it has been refactored into calling a generator helper function.
The outermost loop had an unnecessary line of code that would re-get
values from `fbx_table_nodes`, this has been removed.
Pull Request: https://projects.blender.org/blender/blender-addons/pulls/104954