Move test_size and bind_fid to common code.
Move wait_for_completion to common code and change simple/pingpong.c to
work with wait_for_completion.