Make componentlib compatible with browser

Also simplifies import of .json resources a bit, and
moves from using Assert to Chai in relevant tests.
commandstream needs to shed its dependency on Buffer, or
we need to use a compatibility layer like
https://www.npmjs.org/package/buffer
Also expose commandstream handling in browser