Move the call to "execute" to a method that can be overridden.

Needed to allow running the JS code in an event loop thread in Nodyn.

See my other pull request here: https://github.com/nodyn/nodyn/pull/58