Improve tests and demos, in particular improve the encapsulation around the QMF handling in qpid-config.js to make it potentially reusable

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/branches/fadams-javascript-binding@1624737 13f79535-47bb-0310-9956-ffa450edef68