Moved helper functions diff_test_output() and test_fillin() into functional_test.c.

Also moved process allocation out of functional_test_fork() into
functional_test_alloc().