Getting the page width from the reference file

Uses it to scale images that are too large.
When there is no reference files, default to a US letter portrait size
to scale the images
Fixed absolute URI detection in EPUB writer.  Closes #1672.
EPUB writer: correctly resolve relative URIs.  (Closes #1671.)
EPUB reader:  Further URI handling improvements.

Now we outsource most of the work to `fetchItem'`.
Also, do not include queries in file extensions.

Improves fix to #1671.

It is possible that this will have some unexpected effects, so
further testing would be good.
Merge pull request #1674 from freiric/master

fix inDirectory to reset to the original directory in case an exception ...
Respect indent when parsing Org bullet lists

Fixes issue with top-level bullet list parsing.
Previously we would use `many1 spaceChars` rather than respecting
the list's indent level. We also permitted `*` bullets on unindented
lists, which should unambiguously parse as `header 1`.
Combined, this meant headers at a different indent level were
being unwittingly slurped into preceding bullet lists, as per
Issue #1650.
Fix indent issue for definition lists

Tidy up fix for #1650, #1698 as per comments in #1680.
Fix same issue for definition lists with the same method.
Org reader: fix rules for emphasis recognition

Things like `/hello,/` or `/hi'/` were falsy recognized as emphasised
strings.  This is wrong, as `,` and `'` are forbidden border chars and
may not occur on the inner border of emphasized text.  This patch
enables the reader to matches the reference implementation in that it
reads the above strings as plain text.
Org reader: Drop COMMENT document trees

Document trees under a header starting with the word `COMMENT` are
comment trees and should not be exported.  Those trees are dropped
silently.

This closes #1678.
Merge pull request #1702 from tarleb/org-comment-trees

Org reader: Drop COMMENT document trees
Merge pull request #1700 from tarleb/org-emphasis-fix

Org reader: fix rules for emphasis recognition
Merge pull request #1680 from shelf/master

Respect indent when parsing Org bullet lists
Markdown reader:  allow `startnum` to work without `fancy_lists`.

Formerly `pandoc -f markdown-fancy_lists+startnum` did not work
properly.
Parsing:  fixed `inlineMath` so it handles `\text{..}` containing `$`.

For example: `$x = \text{the $n$th root of $y$}`.  Closes #1677.
Give better error messages when someone tries to convert pdf, doc, odt.

Closes #1683.
Org reader: parse LaTeX-style MathML entities

Org supports special symbols which can be included using LaTeX syntax,
but are actually MathML entities.  Examples for this are
`\nbsp` (non-breaking space), `\Aacute` (the letter A with accent acute)
or `\copy` (the copyright sign ©).

This fixes #1657.
Recognize .icml extension and use icml writer.  See #1707.
Pretty:  Make CR + BLANKLINE = BLANKLINE.

This fixes an extra blank line we were getting at the end
of markdown fragments (as well as rst, org, etc.)

Closes #1705.
Version bump to 1.13.2.

This is needed because of the addition of KaTeX to
HTMLMathMethod.
Merge pull request #1668 from gbataille/widthFromRef2

Getting the page width from the reference file