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.
There's no need for an else here as if entered execution ends here i.e. change to:

    if () {
        throw new ...
    }

    return $a % $b;