allow serializing Tasks that are done or haven't started yet. fixes #4516