Rename `stack` to `queue`

Because it is used as a queue (FIFO), not as a stack (LIFO).

* http://en.wikipedia.org/wiki/Stack_(abstract_data_type)
* http://en.wikipedia.org/wiki/Queue_(data_structure)
Merge pull request #15254 from DNNX/formatter-refactoring-3

Rename `stack` to `queue`