iOS port from libphonenumber (Google's phone number handling library)