tests: fix the flaky test test-logtoprocess.t
The main change is that we're waiting for the [touched] file to appear for 5 seconds instead of 0.1 seconds. Also, instead of implementing wait-on-file from scratch, we use the existing one from testlib/ that works well.
mkcommit(){name="$1"shiftecho"$name" > "$name" hg add "$name" hg ci -m "$name""$@"}