Correct the iterator adaptors used in parsing integers (fixes #3208).

This avoids Azure segfaulting trying to set up a 100999px*100999px canvas.

The test still fails due to its use of getComputedStyle.
Merge pull request #3227 from Ms2ger/3208-parse-integer

Correct the iterator adaptors used in parsing integers (fixes #3208); r=jdm+Manishearth