Fix DoS vulnerability

These are the same DoS fixes as in https://github.com/bos/attoparsec/pull/63 but applied to the `0.11` branch.