Enable building for browser, set up tests

Exposed as component.io library, uses grunt for building.
Eventually the Makefile will be migrated to grunt also.