Fix for issue #31

See https://github.com/marijnh/tern/issues/31

Since tern.js was already using plugins instead of pluginOptions and the web implementation was also working, I updated desktop.js and test.js to use plugins.