[WO-304] refactor to UMD style, implement node shim, add tests

I added unit and integration tests for node.js.