fdo#77382, lp#1342175: fix poor performance with find & replace with empty value

this cherry-picks three master commits:
 1cf19ea84794ca065749667b480dfed2d27d47b7
    don't call ScMarkData::GetMarkedRanges in ScColumn, related fdo#79422
 1e721077b43de84edab2a3ed2f316ddcbec6e3ec
    fdo#83141: optimize slow performance after when using replaceall or searchall
    Reviewed-on: https://gerrit.libreoffice.org/11829
 91502a72c12c559442e8bf77c27a516b49c2a68d
    fdo#83141: also optimize ScTable::HasAttribSelection
    Reviewed-on: https://gerrit.libreoffice.org/11877

Change-Id: I2df0eeefbe27b6a267e960f9ffedab0d4774c8a8
Reviewed-on: https://gerrit.libreoffice.org/13041
Reviewed-by: Seyeong Kim <seyeong.kim@canonical.com>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>