(PUP-2214) change env lookup to current env

This changes the use of the pattern that :environment is used to establish which environment to use throughout the code (when for some reason there is no given environment). This PR attempts to fix all those to use :current_environment in all places that are not use to actually establish what the :current_environment should be.

The remaining cases where an env is looked up based on a name / or the configured :environment has been commented in this PR to expose these places and enable a discussion about the correctness of each such place.