Move test_size, bind_fid and wait_for_completion to common code.

Move wait_for_completion to common code and change simple/pingpong.c to
work with wait_for_completion.
Sounds good - thanks!