Stop leaking all ScPostIt instances.

And re-implement correct swapping of two ScPostIt instances during
sort.

(cherry picked from commit ab05317c79f665bcf9d5cff7b8312ce6963ff969)

Change-Id: Ifbf120aae594342ae0b7c5760f771c53092c8022
Reviewed-on: https://gerrit.libreoffice.org/7641
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>