Fix jshint issues in apidoc/plugins

Whilst I was looking into the events issue in the docs, my editor informed me of some unused variables and other issues in the plugins. I ran jshint and corrected these issues.

It might be a good idea for the jshint build target to include these.