Properly parse Plural-Forms header of PO/MO files (2.6)

So this follows #5347, this time targeting the 2.6 branch, and hopefully compatible with PHP 5.2. I hope it’s fine even if it includes a few other commits not from me.
No, it’s really a stack. A [stack](https://en.wikipedia.org/wiki/Stack_%28abstract_data_type%29) only involves pushes and pops, while a [queue](https://en.wikipedia.org/wiki/Queue_%28abstract_data_type%29) involves queues (`array_unshift()`) and dequeues (`array_pop()`).

Yes, I could perfectly use `array_shift()`, `array_unshift()` and `$stack[0]` instead, and call the stack a reversed stack. But I’d rather stick to the original stack-based algorithm for more clarity, unless the reversed stack brings substantial perf improvements or something.