fdo#72741, fdo#76607: Backport of Calc sort rework.

This change requires mdds 0.10.3 as the baseline.

Conflicts:
	configure.ac
	sc/inc/fstalgorithm.hxx
	sc/source/core/data/column.cxx
	sc/source/core/data/table3.cxx
	sc/source/ui/docshell/dbdocfun.cxx

Change-Id: Ia6d2bf1ee17e96c30b6d5310f5c49e5a4404e094
Reviewed-on: https://gerrit.libreoffice.org/9144
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>