Add CommonJS/AMD support with UMD wrapper.

In attempting to use this lib as a dependency, I was unable to use it in the browser as anything other than a global. This patch wraps htmlparser with a [UMD pattern](https://github.com/umdjs/umd), so that loading via AMD or CommonJS is supported.