[WM Shell] Consolidate `addOrMoveFreeformTaskToTop`, `addActiveTask` and `updateTaskVisibility` into the `addTask` method to simplify the code structure and make it easier to understand.

Bug: 332682201
Flag: EXEMPT (small refactor)
Test: atest DesktopRepositoryTest
Test: atest DesktopTasksControllerTest
Test: atest DesktopTasksLimiterTest
Test: atest FreeformTaskListenerTests
Change-Id: Icedd4f94d7d2308d5ff6d9aa43ad41afa8f4d7bc
9 files changed