Add JACK utility functions in libardour and test

This contains much of the code present in the GUI EngineDialog class
but refactored with some added windows bits.
add and Update mutex test that is no longer necessary now that glib has been fixed
Build system changes to support mingw build target