Refactor: cts: Move the complicated clean_environment function.
The version of this function in cts-fencing can also be shared with the
upcoming cts-attrd, so move it into the base class. cts-exec can do
something much simpler, so it will just maintain its own version that
overrides the base class version.