Make `require` more like Node.js
- Add support for `module.exports`.
- Add support for npm modules in `require()`. Note the following differences
with Node’s `require()` though:
- Only `require(path)` is supported, not `require.resolve()` or related
`module` properties etc.
- Absolute paths (`/foo/bar.js`) are not supported.
- Only JavaScript files may be required (not JSON files, for example). Paths
must not end with `.js`.
Moreover:
- `module.onShutdown(handler)` is used instead of
`require('unloader').unloader.add(handler)`.
- bootstrap.coffee has been cleaned up. I had a lot of help from looking at
<https://github.com/adblockplus/buildtools/blob/
7a305df14bf3d26ff559f06082b87ff7cff4b3b8/bootstrap.js.tmpl>
- `extension/packages/` has been renamed to the more Node-style
`extension/lib/`.
- The huffman module has become its own repository, and is now `npm install`ed.