Improve JACK thread safety.

The JACK sound driver's flags can be changed asynchronously by JACK
via callback functions.

git-svn-id: svn://daper.net/moc/trunk@2661 910807d9-36e0-0310-a014-e9ea483e2ba4
Fix JACK sound driver's hw_funcs.play() function's return value.

The hw_funcs.play() function is required to play all the samples or
return a negative value on error.

git-svn-id: svn://daper.net/moc/trunk@2662 910807d9-36e0-0310-a014-e9ea483e2ba4