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.
You're right, I had the stack operations flipped in my head for some reason. For some reason I remembered the 'head' of the stack being at offset 0.