Basic implementation of Javascript pausing/resuming.

After so long...

Signed-off-by: Robert Xu <robxu9@gmail.com>