static/scriptengine: use Handle instead of Persistence

fixes #569

v2: make it compatible with older versions of v8
Merge pull request #570 from karolherbst/bug569

static/scriptengine: use Handle instead of Persistence