[VPN 2.0] Split BraveVpnService into interface and implementation
To add a new BraveVpnService implementation based on Architecture 2.0,
which must co-exist with Architecture 1.0 for quite a while, we need
to split service's interface and implementation. All the external
components will keep accessing VPN service via the BraveVpnService
interface, but the implementation mostly goes into BraveVpnServiceImpl.
BraveVpnService is a concrete base that implements bookkeeping shared
by both architectures: mojo remote creation and observer management.
The lion's share of functionality is kept in the implementation; if
it becomes duplicated eventually, we can move it to the base later.
This change is a preparatory step to introduce the second (Arch 2.0)
implementation of BraveVPNServiceImpl, which could be selected at
compile time, or (later) at runtime too.
Other notable changes:
- Revised and moved the public VPN service API to BraveVpnService.
- BraveVpnService base is comprehensively covered by unit tests.
- Removed a BraveVpnMetrics::Delegate method dependency in external
components.
- BraveVPNServiceTest test fixture renamed to
BraveVpnServiceImplV1Test.
Implements part of brave/brave-browser#54597