Don't use the destructor to free thread stacks.

If we do, kernelObjects.clear() will trash perfectly good memory on
loading a state.  I guess it also makes shutdown slower.

Fixes #4186.
Fix some warnings.
Fix headless auto-compare when expected have \r's.
Merge pull request #4197 from unknownbrackets/savestates

Fix savestates sometimes wiping thread stacks
Merge remote-tracking branch 'upstream/master' into AudioArtefactFix
Merging new upstream changes
moved all mixing code into PSPMixer