Previously test_consdiff.c just did #include "consdiff.c", which is not great style, and messes up coverage testing.
(This commit was extracted by nickm based on the final outcome of the project, taking only the changes in the files touched by this commit from the consdiff_rebased branch. The directory-system changes are going to get worked on separately.)