Wait for all secondary pipe polling threads to exit before we allow JSShell to quit.