Fix javadoc of Logic.delete
Refactor formatted task list output

* Moved related formatting code to a standalone method formatTaskListOutput() (requires displayedTasksMap to be built first)
* Let search and view methods construct displayedTasksMap and call formatTaskListOutput() to format the output
* Change search and view methods to use StringBuilder for faster performance