Allow multiple calls to get contexts in iOS

When there is no webview, close remote debugger. Otherwise subsequent calls hang.

Fixes issue #2442