[#643] Improve `identifier` parameter matching in `SurveyedLocale`

* Use regex to match `identifier` parameter of `SurveyedLocale`
* Move code to generate `UUID` to `SurveyedLocale` class
* Remove duplicated code