Reset listener=nil before running main() from test cases, so
waitForListener() does not get confused by listener!=nil left over
from previous tests. Fixes intermittent test failures.

refs #3828