Move captureTrace from test utils to general utils

So that we can make use of it in the Flicker junit runners

Bug: 270949117
Test: atest FlickerLibTest
Change-Id: I658009c5ff4b5be6cfac51eef1a88ff795fe7bb0
2 files changed