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.