tdf#128862: fix HSQLDB odb-files with apostrophe crash

see bt:
0  0x00007ffff209866a in std::type_info::name() const (this=0x0) at /usr/include/c++/9/typeinfo:100
1  0x00007ffff20966e1 in exceptionToStringImpl(rtl::OStringBuffer&, com::sun::star::uno::Any const&)
    (sMessage="DBG_UNHANDLED_EXCEPTION in bool connectivity::hsqldb::OHsqlConnection::impl_isTextTable_nothrow(const rtl::OUString&) exception: com.sun.star.sdbc.SQLException message: Unexpected token: S in statemen"..., caught=
  uno::Any("com.sun.star.sdbc.SQLException": {<com::sun::star::uno::Exception> = {Message = "Unexpected token: S in statement [s]", Context = uno::Reference to (com::sun::star::uno::XInterface *) 0x555559269238}, SQLState = "37000", ErrorCode = -11, NextException = uno::Any(void)})) at /home/julien/lo/libreoffice/tools/source/debug/debug.cxx:113
2  0x00007ffff209855d in DbgUnhandledException(com::sun::star::uno::Any const&, char const*, char const*, char const*, char const*) (caught=
  uno::Any("com.sun.star.sdbc.SQLException": {<com::sun::star::uno::Exception> = {Message = "Unexpected token: S in statement [s]", Context = uno::Reference to (com::sun::star::uno::XInterface *) 0x555559269238}, SQLState = "37000", ErrorCode = -11, NextException = uno::Any(void)}), currentFunction=0x7fffdb5ca340 "bool connectivity::hsqldb::OHsqlConnection::impl_isTextTable_nothrow(const rtl::OUString&)", fileAndLineNo=0x7fffdb5ca2e8 "/home/julien/lo/libreoffice/connectivity/source/drivers/hsqldb/HConnection.cxx:301: ", area=0x7fffdb5c9f49 "connectivity.hsqldb", explanatory=0x0)
    at /home/julien/lo/libreoffice/tools/source/debug/debug.cxx:418
3  0x00007fffdb58a16a in connectivity::hsqldb::OHsqlConnection::impl_isTextTable_nothrow(rtl::OUString const&) (this=0x555558a43de0, _rTableName="William Kidwell's Address Book")
    at /home/julien/lo/libreoffice/connectivity/source/drivers/hsqldb/HConnection.cxx:301
https://bugs.documentfoundation.org/attachment.cgi?id=155952

Change-Id: I2bc744164b1470d8f09bcb126b02e48af180e886
Reviewed-on: https://gerrit.libreoffice.org/83245
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit c5f0e89ee5b1d13416987ddceaccc4d8a0816986)
Reviewed-on: https://gerrit.libreoffice.org/83436
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
(cherry picked from commit 5fd96e4b96da471afef510c8e3c26ab3c4890881)
Reviewed-on: https://gerrit.libreoffice.org/83517
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index fdfd725..65395a1 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -106,6 +106,7 @@ OString exceptionToString(const css::uno::Any & caught)
        sMessage += " message: ";
        sMessage += toOString(exception.Message);
    }
/*  TODO FIXME (see https://gerrit.libreoffice.org/#/c/83245/)
    if ( exception.Context.is() )
    {
        const char* pContext = typeid( *exception.Context.get() ).name();
@@ -120,6 +121,7 @@ OString exceptionToString(const css::uno::Any & caught)
        std::free(const_cast<char *>(pContext));
#endif
    }
*/
    {
        css::configuration::CorruptedConfigurationException specialized;
        if ( caught >>= specialized )