Fix testRegisterComponentCallbacksOnWindowContext flaky

This flakiness is due to race of config updates when WindowContext attaches to
DisplyArea.
This CL fixed it by:
1. Don't dispatch config updates to the client side when registering to
   DA. We have reported the value by the return value of
   #attachWindowContextToDisplayArea.
2. Use Handler#runWithScissors when attahing DA or DC. It can prevent
   WindowContext reports stale config values and also guarantee the order of
   onConfigurationChanged call.

Bug: 190019118
fixes: 228911504
Test: atest RegisterComponentCallbacksTest --iterations
Test: atest WindowContextTest WindowContextTests
Test: atest WindowMetricsWindowContextTests

Change-Id: I496d00bbfdc20b9bbf433d5d8ec65bf1f46d3dd3
6 files changed