Improving efficiency of bubblesort.

When sort is completed, remaining iterations are broken.