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