insertion sort algorithm written in C. the algorithm keeps tracks of the number of key comparisons performed