build: Allow creating an out-of-tree dpkg database
build: Do not pass -r to rm for db/arch

This is a file, there is no need to recurse on it.
build: Specify a --log for dpkg

This avoids polluting the system log file with the test runs.
test: Use DPKG_CONFIGURE instead of its expanded form
t-triggers-depends: Improve test case
t-triggers-selfcycle: New test case
t-triggers-halt: New test case
t-triggers-depfarcycle: Rework test case