Moved common repl2 functions to repl_util and added log_to_nodes tracing...

... to replication2_dirty test

This is just a refactor of common repl2 kinds of functions into repl_util for common use between other replication tests. I'll use these in the new FS test as well. In addition, I've added some log_to_nodes() tracing in the replication2_dirty test to aid in debugging.