Improved markup parsing, image auto scaling, formatter correction

The parser now escaped from earlier tags open and hitting untagged data
after several tags have been closed. This fixed two test cases from the
example source

Images now become scaled down if they are set wider then the canvas
itself, respecting there aspect ratio

If image descriptions are extending out of the canvas, the image is put
on a new page instead, this wasnt the case earlier.

Fixed some bad spacing of the image descriptions.

Corrected the formatter to apply or reset styles now more proper.

Update source with a more clear test case.