Source profiles in detaching tasks, for cylc version selection.

Minor change, affects only the "cylc environment" string provided to detaching tasks.  CYLC_VERSION was set in this, but profiles weren't being sourced to allow users to choose between cylc versions based on the value of the variable.