QTextCodec: retain input's nullness on {to,from}Unicode
Bring back compatibility with Qt 5.15; return a null result if the
input is null, and an empty result otherwise. Amends
3695cd090b7f490e941fa837b49f926514a82ddd, which returned a null-
result even if the input was an empty string of zero length.
Add test coverage; running this test case against Qt 5.15 results
in the test passing, with expected failures for the case of a
nullptr input. These are objectively wrong if the goal is to retain
nullness symmetrically, but the Qt5Compat library's purpose is to
provide behavior that is identical to Qt 5.15, so leave those
expected failures unfixed.
Fixes: QTBUG-116981
Pick-to: 6.6
Change-Id: I8fa0f10258752446966055ad4ce8b99688b66104
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>