Fix tearDown of ActivityViewTest

The order of global cleanup is moved to the last execution in
commit 7cfb452. That may cause a timing that the host activity
is performing traversal on the ActivityView after it is released
and then accesses the removed display. This fix just detaches
the view before releasing to avoid the case.

Bug: 112837428
Test: atest CtsWindowManagerDeviceTestCases:ActivityViewTest
Change-Id: I605ddd6fa5500412357e5a5e0f03bc0bf58faae2
1 file changed