restart multiple main processes in parallel

original idea taken from Alex Surikov, also this is his comments:
what used to happen was that we'd go through all main processes
sequentially (create stop file, wait, remove stop file, rinse&repeat)
in the worst case a clean (stop file) restart can take up to max_procs*stop_file_kill_timeout seconds

with this this patch we pre-creat stop files before doing any waiting
therefore the worst case for a clean restart now is around stop_file_kill_timeout seconds