build system: change the naming convention for the source files
of perf tests, so we can have a debug and a release test of the same
functionality.

Also, fix some missing headers in the memory test.