Switch to common.js require, browserify, and istanbul.

This probably requires more polish, but seems like it works :)