lupdate/Python: Fix plural detection for QCoreApplication.translate() when count is an expression
When count is an expression instead of a plain integer, the function
matchEncoding() used by parseTranslate() to check on the "Encoding"
enum in the deprecated overload
QCoreApplication::translate(const char*, const char*, const char*, Encoding, int)
(Qt 5) reads over the variable containing the number and thus plural
detection fails.
Removing matchEncoding() unearthed some hangs in the helper
matchExpression().
To fix this, replace its implementation by a simpler one modeled after
CppParser::skipExpression() and rename to skipExpression().
Fixes: PYSIDE-3418
Pick-to: 6.12
Change-Id: Icb5ecd61487a368f2b32ada53e06683b449a13bb
Reviewed-by: Masoud Jami <masoud.jami@qt.io>