Use `enum` type for the `filter_mode` parameter of many functions. This
makes debugging easier and just makes the code slightly easier to
understand.
Also make the function parameter `const` wherever possible. Unfortunately,
due to the `BEGIN_ANIMFILTER_SUBCHANNELS` and `END_ANIMFILTER_SUBCHANNELS`
macros (which modify `filter_mode`), this is possible less often than I'd
like.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/122882