Fix for multiple triggers toggling different classes on single targets

An issue was found which prevented multiple distinct triggers toggling different classes on a single target. As an example, two links that were toggling .class-a and .class-b respectively on a single target element would only have toggled the class set by the first trigger to run.

This commit rewrites a significant portion of the plugin so that multiple triggers can toggle different classes on the same target.