Move country constraint logic into standalone class.

In a subsequent change, the assisted dialing settings
will be able to use the parsing logic to filter
the available countries listed in the settings.

Bug: 69274259
Test: existing tests
PiperOrigin-RevId: 177338864
Change-Id: I8ef76874d5f6d885b415174371225b738cc68716
3 files changed