Reset state to allow multiple start()/done() calls from the same process.
Added saving host/port configuration to reuse in start/loop calls.
Added reset of hook visits in case earlier start() call is refused.
Updated filenames/source code heuristic to avoid serializing filenames.