Instead of nuking the unit test logs capture them according
to how tempest (and oslotest) capture them so that the tests
when ran locally provide the full logging output instead of
a miniaturized version.
This adds in the following environment variables which can
be used to control testr captured logging:
- OS_LOG_CAPTURE (turns on log capturing so that the testr
repository will have log output, at a INFO level)
- OS_DEBUG (changes the captured logging level from INFO
to DEBUG, only useful when OS_LOG_CAPTURE is enabled)
It also creates a lambda that is used to test whether an
environment is enabled (avoiding recreating the same set
of checks in multiple places).