Move context.debug to context.env.debug and clone entire "rave/env" property from metadata to context.