Simpler state machine transitions in Tasks

CAS in loop aren't necessary. Both addTask and fetchTask operations
are wait-free now.

addTaskFetchTask and fetchTaskAddTask could be implemented using
pairs of CAS, but it won't be faster than calling addTask+fetchTask
and fetchTask+addTask respectively.