Changed the signature for quick sort partition to return the updated pivot index