CommonJS

This is a follow up and subsumes #368 and finishes support for CommonJS. This fixes the logic for Git reference following, which in turn decides whether to build to` releases` or `releases/{version}`. It posts a version if the Git head matches the Git tag for the version as stated in `package.json`. In the former case, the products are usable for local testing. In the latter, they are suitable for uploading to S3.