Merge pull request #37 from padenot/sync-back

Sync back mozilla-central changes
Some more change to support testing

- put the `delay` function in the header to make it easy to write gecko tests
- add a test to test new cubeb API function
- update tests so they pass on every platform
- fix the bustage caused by the previous patch
Merge pull request #39 from padenot/more-testing-stuff

Some more change to support testing
Sync changes with gecko-dev version.
test_sanity: Fix test for Windows 7.
pulse: Fix locking in get_max_channel_count (from BMO 996770).
opensl: Tweak sample rate restrictions on stream_init (from BMO 992854).
audiounit: Limit active streams to 16 on OS X < 10.7 (from BMO 847903).
Sync changes with mozilla-central copy.  Includes BMO 1062293, 1057199,
848954, 1054176, 1052923, 1046592, 1049478, 1046470, 1045018, 1023947,
1027713, 1015932, 1032266, 1034140, 1033192, 1020227, 1017438, 1026854,
1008079, 1007552.
jack: trivial compile fix (untested)
shrink stream limit even further, per bmo 847903.
sync tests with mozilla-central.
test_sanity: use ARRAY_LENGTH everywhere to make it easier to update context/stream counts in sub-tests.
Brought in missing files from the Mozilla version
Upgraded wasapi to use CreateThread
Force being outside speex.

We are not able to be inside speexx.
Autoconf fails to set the macros for some reason, and they're being used incorrectly anyhow.
Convert winmm to use CreateThread and add missing WAVE_FORMAT_48s16 macro for MinGW
We have no choice but to lie about windows 7 on mingw.

Mingw has no understanding of the VerSetConditionMask function. Since the test must always pas, we say that we're Win7.
Revert "We have no choice but to lie about windows 7 on mingw."

This reverts commit 5137c600bd0df84973dd34ff9ffe311f27978f8f.
Revert "Convert winmm to use CreateThread and add missing WAVE_FORMAT_48s16 macro for MinGW"

This reverts commit 58166560298490fdfde041f37f535ec6aed7f181.