gnomesort - similar to insertion but with swaps as in bubble