Reduce the chance of activity manager tests being flaky

It is possible we get the activity manager and window manager states
before the activities under test is visible. We now wait a little for
the activities to be visible before getting state information.

Also, added configuration handling to some pipeable activities.

Bug: 26982752
Change-Id: I0a367e9d5b4e4f4e5174deb38362a3d85444cf37
6 files changed