targets/core: Set proxy variables based on previous proxy setting

On update, obtain `*_proxy` variables from the previously generated environment, and export them after sanitizing the value (to make sure we do not eval random harmful stuff).

Fixes #883.

Tested in `2014-07-04_04-33-53_drinkcat_chroagh_fix-proxy-env/peppy-beta_2f863267` (that is, `squawks` completed, which should be good enough).
When `PROXY` is set and we actually generate the content, yes. When we copy over whatever was in between `###`, not so much (but maybe I'm being a bit overcautious here).
An alternative would be to sanitize the content we copy over in the awk like above (similarly to the sed line below), and source that.