media: Refactor and improve robustness of AdaptivePlaybackTest Bug: 14793152 Change-Id: I47022e24c82c7ff5dd0e8b7bd23f3b001a0ece6f