tests: Add a generic fd leak detector
tests: Add a generic fd leak detector

We seem to have discovered the proxy has some fd leaks. It could be a
good idea to check for that a test time.

The FdLeakDetector struct implements some facilities to discover fd
leaks: one needs to take snapshots of the opened files before and after
the code to test. We can then compare the two snapshots to check if we
have different sets of opened files.

Signed-off-by: Damien Lespiau <64bd3cb94f359c1a3ce68dae5e26b40578526277@intel.com>

dlespiau/clearcontainers-proxy,clearcontainers/proxy,dlespiau/clearcontainers-proxy,dlespiau/proxy,clearcontainers/proxy,dlespiau/proxy