Add optional logging of subprocess execution
Now that the subprocess calling has been refactored and is in a nice
shape, it's quite simple to add some logging facilities. This patch
adds two separate log modes, switched by the STG_SUBPROCESS_LOG
environment variable:
* Setting it to "debug" prints the executable name and all
arguments, and the subprocess return value.
* Setting it to "profile" prints just the executable name, and the
(wallclock) time elapsed during the call.
* Not setting it will disable logging, of course.
Signed-off-by: Karl Hasselström <kha@treskal.com>