Keep the ssh tunnel alive while background tasks run.

@matthewrmshin - please review, with reference to email exchange with Yi Xiao yesterday - it turns out we can read remote background PID without blocking until the job finishes. So this allows remote background job submission to work even at sites that do not allow "unattended" user processes on login nodes.  Cherry-piced from my poll-and-kill branch.