Rewrite the script runtime core in JavaScript

It used to be CoffeeScript.
Fix jshint errors in ObjC runtime