Implementing Queue in Swift