Move sortAndFilterAnyMergableNodesSafe into KisLayerUtils
All node sorting algorithms should be in one place