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.
A reason for why there was a syntax error would be more helpful when people make a mistake.