utils_env: Solve the RuntimeError issue

In order to make sure the threads updating the environment
contents will not do so while the same is being saved,
introduce env.save_lock, that is a reentrant lock from
the standard python threading module. Threads that update
the env contents *have* to acquire env.save_lock first
before doing their job.

Differently from other solutions, this one doesn't require
a lot of refactoring to the current code. While it does
certainly need refactoring, we can do so now with less
pressure of fixing a glaring bug while doing it.

With this, the threads don't step on each other's toes
and the problem is solved. Update utils_env_unittest to
use the save_lock, making all unittests to pass again.

The credit for the idea that finally solved the problem
cleanly goes to Pavel, I just implemented it in the
context of the PR.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>