Define Cloak client with UMD pattern

Implement a more explicit mechanism for defining the Cloak client in
both "browser global" environments and Node.js. In addition, implement
support for AMD environments.