Provide UMD compatibility.

* Ensure build output is wrapped to support both AMD (e.g. RequireJS) and
  CommonJS (e.g. Browserify) module formats.
* Use a dedicated wrapper.js file since the complexity has grown.
* Streamline how the API is defined for both the main and bootloader binaries
  to reduce boilerplate.

Closes #40.
Merge pull request #50 from nicksay/umd-compat

Provide UMD compatibility.