Custom Quicksort in Swift