ecmascript: Add support for page.redirect()

Fixes #2327
ecmascript: Protect against multiple resourceDestroy()