See issue Ultimaker/CuraEngine#240
The intent of this change it to allow token replacement in start/end
gcode similar to the old Cura. Tokens are of the form
{material_bed_temperature} where the name is any setting name that is
passed to the engine.
Control the backend's generation of temperature commands via new
settings material_bed_temp_prepend and material_print_temp_prepend based
on whether there are temperature tokens in the printer profile's start
gcode.
This change will generate the same temperature gcode as FffGcodeWriter
at the head, if none of the temperature tokens are present in the
machine profile. Otherwise, they're suppressed via the prepend settings.
Also, set fdmprinter.json so that all that inherit from it default to
having the gcode temperature prepend also wait for temperature. Profiles
can override these settings: material_bed_temp_wait and
material_print_temp_wait
This PR intends to change both Cura and CuraEngine. However, it is safe
to sequence with the Cura change first which will do token replacement
(if present), but will fail to supress the temperature prepends.
This way it can be properly threaded (with a generous sprinkling of
"yieldThread") so we do not block the UI when slicing starts.
Contributes to CURA-358