Fix issue with task overlay activities not finishing.

- The task overlay activity should only exist when there are activities
  present in the task.  When the last such activity is finished, we should
  remove the whole task entirely including the task overlay.
- Exposing the task overlay apis to CTS

Bug: 36507456
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testFinishPipActivityWithTaskOverlay
Change-Id: I1dabe7782fb6769a90d832664e8052be158041e1
7 files changed