The issue was that the code filtered for selected channels,
while the expectation was that it would only filter for selected keys.
This PR changes the behavior of the operator in the following way:
* when "Clean Channels" is **disabled**, it will clean only selected keyframes, regardless of the channel selection
* when "Clean Channels" is **enabled**, it will clean selected channels regardless of keyframe selection
The same logic was applied to the Graph Editor code.
It only makes a difference in the case when "Clean Channels" is enabled.
That is because channels were automatically selected when a key was selected.
In addition to that I moved the menu entry for "Clean Channels" to the channel menu
to reduce confusion.
Another solution would have been to make the Dope Sheet select channels
when keys are selected. This might still be done in the future, but I think the
only correct fix is to change the actual operator behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/113335