Introduce a new function that waits for processes to start with a
configurable timeout and interval. By default, it sleeps for 1 second
intervals for up to 30 seconds waiting for a process to start.
It tries to address sporadic failures in test pflog:rdr_action which may
be caused by an insufficient sleep time during tcpdump startup. The new
function provides reliable process detection with configurable
parameters for different timing requirements.
The implementation uses pgrep to detect running processes and includes
proper timeout handling to prevent indefinite waiting, as well as an
optional jail parameter. There are many "sleep 1" calls in the test
suite that can be replaced with this helper function.