Add implementation and unit tests for selection sort