Fix overflow issues when converting float to int

32-bit floats can only reach between -16777215...+16777215 (25 bits) before it
starts losing whole-number accuracy. Some compiler optimizations may break
trying to multiply a float by 2147483647.0 when the result is given right to a
float parameter, causing it instead to multiply by the nearest representable
float value, 2147483648.0.
Modulator fixes

Modulator functions return 0..1 instead of -1..+1
Apply high-pass filter before modulation
Increase fractional precision to 24 bits from 16

Thanks to Mike Gorchak
Implement distortion and equalizer effects

Code provided by Mike Gorchak
Avoid recalculating the same coefficient
Fix a potential leak when mmdevapi fails to open
Clear all the old channel gains to 0 before setting them
Remove an unused macro
Use some macros to help with deriving types
Fix possible overflow when converting float to int

Same as with the mixer, we can only use 25 bits of precision from
floats.
Split chorus delay calculation into separate methods
Split flanger delay calculation into separate methods
Process 64 samples at a time for some effects

This should help with the non-interleaved samples of the output, and
allow skipping channels that don't contribute to the output.
Process 64 samples at a time for chorus and flanger effects
Avoid storing some chorus and flanger properties in the effect state
Pre-scale the chorus and flanger delays to be in samples
Rename some inheritance macros
The effect state being destroyed can't be NULL
Avoid storing the device frequency in the distortion state
Use macros to help define vtables for effect states
Auto-generate wrappers to upcast objects before calling user methods