Configure: debugging enabled by default

Also factorize the code for setting up the build system with debug info,
which fixes the partial set up that used to be done for bytecode compilation.