Implement dependency checking and undo

For #167 #26
**Dependency Checking**
- Circular dependency is only possible on UpdatingTask since task is added one by one and a task cannot dependent on non existing task.
- Hence during UpdateTask, the graph is checked for circular dependency, if it is, revert the changes and rebuild the graph again.
- When deleting task, right now the course of action is to simply rebuild the graph.

All the said operation takes O(V + E)


**Undo**
- Due to the nature of Add Query, Undo didn't preserve the task id of the original task. As such, a new id is generated when undoing a delete task action.
yeah this breaks naming convention too...