audio: Fix addsound() and playSound() to return correct sound IDs

The returned ID (actually, channel number) could be used to manipulate
the sound after it started playing.  The same thing is already done in
3-D sounds.
audio: Add isEndSound() to query if a played sound has finished

It's the same functionality as isEndSound3D() added at c05e740,
but this time it's for static sounds.

Also quitted exposing internal functions in wavemixer.cpp.
Fix occasional access violations in sqserial_findobj()
audio: Make isEndSound() accessible from Squirrel scripts