support for global collision callbacks in JS

Adds support for global callbacks for particle collisions to allow you to write scripts that handle the collision logic in the script context instead of the particle's context. This allows you to write more complex collision logic and keep it central to a single executing context.

* Adds global callbacks for collisions - closes #1707 
* changes collisionWithVoxel() to take a VoxelDetail which is a JS style struct instead of an object - closes #1744 and closes #1748 
* DRY up some of the particle script execution code
* adds some more sample code - closes #1746, closes #1747
* adds new properties to KeyEvent in JS: text, isControl, isAlt, isKeypad, closes #1752