update AMD recommendation in plugin guide

The factory function is already in the format of an AMD callback, so it doesn't need to be wrapped.  Also, there isn't a need to set `exports =` since the AMD loader handles that (and the definition as it stands will create exports as a global).

Also, note the CommonJS module definition is really a Node.js module definition since `module` is not a part of the original CommonJS syntax.  I don't use CommonJS/Node modules myself so I'll leave it up to someone who does to update the recommendation if it seems important.

This PR also adds a newline to the end of the file, the editor did that automatically.