Update threex.sparks so it works with latest Three.js 

This update fixes Threex.sparks so it works with Three.js r57. It also cleans up some of the Threex.sparks code according to JSLint rules.

I originally hacked on this fix at https://github.com/themasterchef/sparksjs-dev.

In the sparks example, WebGL also no longer spits out hundreds of warnings to the console (which it did before).

Unfortunately, due to the scale of changes required to make it work the new version is not backwards compatible with old Three.js versions.