Fix an issue in the `kernel_running` function of the JS tests,
This fix allows the JS test to be ran against a remote server
with a higher than LAN latency.  This bug in our testing
framework was exposed when running `iptest js/widgets --url`
against tmpnb.
Merge pull request #6768 from jdfreder/remotetestfix

Fix an issue in the `kernel_running` function of the JS tests,