Common code + cleanups for fabtests

First patch just removes many unused headers.

Second patch creates a function to print the perf strings that the various tests had all copy-pasted.