Test support: add setupActivity to ComposeScreenshotTestRule

Allow customizing ComposeScreenshotTestRule with setupActivity which
runs before setting content.

The first use case can be seen in CL:34638904 where setupActivity is
used to switch the ScreenshotActivity to fullscreen mode. When this was
done in `beforeScreenshot`, flakiness with image rendering was observed.

Bug: 428863595
Test: existing tests using ComposeScreenshotTestRule still compile
Flag: EXEMPT - test-only change.
Change-Id: Ice157b7e5dbafe28f237b160d3945e98cc8739a0
1 file changed