Use partial sort algorithm instead of full sort if has inline limit node

Bug: If you have an offset, you have to sort (limit + offset) tuples.