Move some useful functions into testutils.c

to make them available to other tests, not just the profile tests.
Move the sproxyd test into its own .c file

and modify it to do less in the test function and more in fixtures.
This will make it easier to write more tests like it.