Extend logbook and storage to work with retry

- Store AtomType in TaskDetail (TASK_DETAIL or RETRY_DETAIL)
- Extend storage to work with retries
- Add alembic migration for database

Change-Id: I07896d4b79ebe5de33f65e00a3bd32af543a09b4
Merge "Extend logbook and storage to work with retry"