access/alsa.c: fix racecondition on demux->p_sys variable

The Thread() function could access demux->p_sys before it was assigned a value other then NULL.
If this happens then it will crash on line 158 while accessing sys->pcm.