Add Q_ASSERT: empty tied segment in createClefs function
Dynamic programming algorithm to find optimal clef changes