This CL fixes the following issues:
- addListenerForType for multi-types can invoke onTaskAppeared
more than once.
- removeListener for mulit-types listener removes the first type only.
Bug: 200322591
Test: atest ShellTaskOrganizerTests
Change-Id: If53085ab229e3a1525b36aa3d964def0f228200c