Add some Windows boilerplate to osdep_preinit

This enables heap corruption detection, re-enables the error reporting dialog and moves the safe DLL search path stuff from ao_wasapi.c so it applies process-wide.

The lack of an error reporting dialog is fairly noticeable, since mpv just disappears when it crashes without it. Windows users expect an error reporting dialog in this case, so they know that there was an error.