Use Queue API instead of inefficient operations

In Scala 2.10.x, Queue#:+ has a performance issue.
https://github.com/scala/scala/commit/f0f0a5e7813501d985174d3c5573c34c8a7608c6

So this commit replaces that operations with Queue#enqueue.
And use Queue#dequeue explicitly instead of Queue#head and Queue#tail. There is little dirrerence between these operations, but it will be obvious that Queue is used correctly.