[packaging] Fix Qt4 .spec file
Tests: fix index out of range in applicationFilePath()

Most probably in order to prevent instantiating QApplication despite
QtGui module was used, some test cases used QTEST_APPLESS_MAIN and
instantiated QCoreApplication manually, passing argc=0.
QCoreApplication::applicationFilePath() does not expect argc ever being
less than one.

Qt5 testlib comes with QTEST_GUILESS_MAIN which works as expected here.
For Qt4 build QTEST_GUILESS_MAIN definition is available from project
file.

This also fixes many failures to find a file at path relative to test
executable.

Note that in ft_locales.cpp QTEST_MAIN is used as QGuiApplication is
needed by the code.
Tests: fix ft_locales:testBug169305

Without specifying context the string is not translated.
[libmlocale] MLocale: do not segfault without qApp

I.e. when just QCoreApplication is used, not QGuiApplication.
Tests: fix ft_locales

Note that I have not found when/how the issue with toLower('ẞ') was
actually fixed so I admit the version check is quite likely
inappropriate.
Tests: fix ft_localedata

ICU data format has changed.
Tests: fix ft_mcharsetdetector:testConstructors

Note that I have not found when/how this changed so I admit the version
check is quite likely inappropriate.
Tests: fix ft_mcharsetdetector:testDetection

It seems ICU simply changed its autodetection to prefer Hebrew Logical
over Hebrew Visual.
[libmlocale] MCalendar: fix set/get QDateTime

This fixes two issues with setting/getting QDateTime. The first one is
the original reason for this commit. The second one has been fixed as a
"side effect" of the fix to the first issue (test case fixed to pass
with the second issue fixed.)

1. Issue with dates before the Gregorian cutover.

   This has been broken with Qt 5. QDateTime implementation has been
   simplified in Qt 5 - it lost the special handling of dates before the
   Gregorian cutover, which used to be treated as Julian dates in Qt 4
   much like ICU does.  Compare Qt 4 and Qt 5 version of
   julianDayFromDate() in qdatetime.cpp. As a result, setting
   QDateTime(0646-07-22) to MCalendar gave 0646-07-19 back as detected
   by Ut_MCalendar::testFormatDateTimeICU(ja_JP
   “Gy年M月d日EEEE時mm分ss秒 zzzz”) (The original difference of 10 days
   between Julian and Gregorian calendar grows by about three days every
   400 years.  Counting back from 1582 to
   646 it gives (1582-646)/400*3 = 7 days less which is where the three
   days difference between 0646-07-22 and 0646-07-19 comes from.)

2. Issue with date and time colliding with summertime switch (local time
   equivalent to 1:00:00-1:59:59UTC).

   See "avoid conversions by Qt" comment in the original
   MCalendar::qDateTime() code. The result (as incorrectly accepted by
   Ut_MCalendar::testMLocaleCalendarConversionsFromLocaltimeQDateTime(
   2010-02-28_en_GB_Gregorian Berlin Summertime switch)) was that though
   the invalid date 2011-03-27 02:01:00 CEST was correctly formatted
   with time 03:01:00 CEST, parsing 2011-03-27 03:01:00 CEST gave
   invalid date with time 02:01:00 CEST. Test case fixed.