Move BackupAgent connection to a helper class

This is to isolate some scope of UserBackupManagerService. It's too big
and unreadable.

I've also added some tests. But since these are blocking and async
operations, I couldn't see any way other than adding some thread sleeps
to avoid flakiness.

These tests could still end up being too flaky. If that's the case we
might have to leave this code untested :(

This is a no-op refactor.

Bug: 376661510
Flag: EXEMPT refactor
Test: atest BackupAgentConnectionManagerTest & atest CtsBackupHostTestCases
Change-Id: I9893336fb224148ce5b2f3c6fa2fc26828d2a1e9
15 files changed