tests: fix "make check" under VPATH builds
Previously, we generated init.cfg in $builddir, while tests/init.sh
reads its configuration file (init.cfg) from $srcdir. This patch
moves the auto-generated part into a separate file
($builddir/init-env) and read the file from $srcdir/init.cfg.