Fix name mangling conflicts for the script decorator system (PR #8464)
Fixes #8463
Summary of the issue:
When using multiple global plugins with decorated scripts, the decorated script gestures were added to the GlobalPlugin base class.
Description of how this pull request fixes the issue:
When a class already has a __gestures dictionary, copy that dictionary before processing the decorated scripts. This makes sure that we do not touch the dictionary of the base class. We also only set the __gestures attribute on a class when it contains items.