fdo#83764: Ensure that the row position is below MAXROW.

When attempting to split formula groups, else multi_type_vector would
try to locate a block outside its logical range.

Change-Id: I424ede112138de459b5ba3bff5e021c4407ccf3d
Move all sort related unit tests to separate source file.

Change-Id: I26e967e9d9fb361ad0d8988715d0d0fd47e478fe
fdo#83764: Write test for this.

Change-Id: I4bc7c3ebdca14caa7d1c8edc2ad777a0e6dd5de2