support external dependencies

This involves a wholescale rewrite to stop using browserify and instead
use grunt-pure-cjs since it enables bundling the browser side module with
a UMD wrapper that specifies dependencies.