reorganize DAC loop

- move most of the code of UpdateDAC into separate functions
  (GetNextSample, HandleSampleEnd)
- added reference code for the PWM driver
add optional Linear Interpolation resample mode for DAC sounds

- split even more code from UpdateDAC (preparing PWM support)
- added resample modes DACSM_NORMAL and DACSM_INTERPLT
- fixed FadeOut crash
- added option to globally enforce a certain resample mode