This adds source files in compat, test, and util to SRCS so that the top-level Makefile.local will generate dependency files for them.
This matches the way the other 'Makefile.local's work.
We keep the lib/xutil.c version. As a consequence, also factor out _internal_error and associated macros. It might be overkill to make a new file error_util.c for this, but _internal_error does not really belong in database.cc.