Implement the rules for parsing integers as defined by HTML, and use them for canvas.
Handle failure to parse the value of the width and height attributes on canvas elements (fixes #3200).

The remaining failures are due to the tests's use of getComputedStyle.
Merge pull request #3205 from Ms2ger/parse-integers

Parse canvas's width and height attributes according to the specification; r=jdm