Add remaining fixes for JavaScript CloudI API. Add a javascript version of the messaging integration test.