testsuite: complex testing of xml locales

Related to rhbz#909536

Signed-off-by: Jakub Filak <jfilak@redhat.com>
localization: properly handle locales with encoding suffix

XML nodes contain xml:lang attributes whose values are plain language
codes (en_GB, zh_CN, ...).

libreport tries to find exact match with cur locale which may be
suffixed with char set identifier (.UTF-8). Therefore libreport never
finds exact match.

This patch removes the encoding suffix from cur locale string.

Related to rhbz#909536

Signed-off-by: Jakub Filak <jfilak@redhat.com>