sort: Add BubbleSort function which implements the bubble sort algorithm.