Refactor common testing code for layerlifecyclemanager

Pull out some helper functions that can be used with benchmark tests.

Flag: EXEMPT refactor
Bug: 353535845
Test: presubmit
Change-Id: I59392645e2b0bc675a2feb0f3e01ac91f7a57d1d
5 files changed