Use secure_env_enabled from payload to determine secure env availability

This moves decision about secure env vars availability to the server
instead of the worker.