No functional changes intended.
After moving the keying set code to animrig with b38d8ecb86,
a few things needed cleaning up.
* Improving comments
* adding `const` where possible
* simplify code in some areas
Pull Request: https://projects.blender.org/blender/blender/pulls/130314