Use an enum for internal task types

For WorkRequests of type internal, task_name is currently a string that is explicitly checked (current values:synchronization_point, workflow).

They should become an enum (see !737 (comment 479588) )