sql: add the recurrence policy to tasks and related fields to task_type
This is the groundwork for the implementation of T720:
- it adds the minimal set of fields required to allow for a task to be retried
on transient failures;
- it adds knowledge of whether a task is one-shot or recurring