c_plugin: Apply the plugin-related changes from master @ 12b6c1ae.

Not applying this earlier caused the rffmode regression fix to
cause the same problem it was intended to solve.

There are some differences because there were portions of the
change that already existed in the C-plugin.
avxsynth: Synchronize plugin with upstream master.