An interval tree implemented in Swift