Set up modular build to support custom CSS.

This makes some changes to our modular build to not pre-bundle public modules. It also enables support for compiling custom CSS by providing a Node build script to invoke the r.js optimizer instead of relying on the commandline tool.