polling-jsonp: remove the script when the window is unloaded

Very similar to #283.
The patch ensures that no spurious error is emitted when the window is unloaded.

Fixes https://github.com/LearnBoost/engine.io/issues/247.