Use const references to strings rather than pass-by-value
restart process after finding threads

There's an interaction between stopping the process earlier now, and
finding the threads that means the stop needs to be done again to pick
up all lwps. Will investigate, but this works for now.