Fixed the equals() method in Task

consider different cases
Fixed the bugs in the constructor
Fixed the bug inside UndoManager