Docx reader: Fix window path for image lookup.

Don't use os-sensitive "combine", since we always want the paths in our
zip-archive to use forward-slashes.
Docx reader: Modify mediabag test accordingly.
ConTeXt writer: add function toLabel

This function can be used to sanitize reference labels so that
they do not contain any of the illegal characters \#[]",{}%()|= .

Currently only Links have their labels sanitized, because they
are the only Elements that use passed labels.
Fix 'Ext_lists_without_preceding_blankline' bug.

  * Fixes #1636.
  * Adds a test.
LaTeX template: load polyglossia before bibtex.

Fixes jgm/pandoc-templates#70.
Thanks to bluebirch.
Merge branch 'master' of github.com:jgm/pandoc
Merge pull request #1644 from mpickering/master

Fixes and Enhancements from the tracker
Merge pull request #1589 from mszep/master

Add function to sanitize ConTeXt labels
Merge pull request #1601 from jkr/windowsfix

Fix path-slashes inside archive for windows
LaTeX template:  Add shorthands=off to babel options.

Closes #1648.
Adde network dependency under network-uri flag in test section.
Updated description of heuristic for math `$`.
Don't wrap lines in rST line blocks.

Closes #1656.

Fixing pandoc to wrap the lines but insert spaces would be much
more complicated.  This at least makes the output semantically
correct.
RST writer:  Wrap line blocks with spaces before continuations.

Improves on fix to #1656.
Added `track` to list of tags treated by `--self-contained`.

Closes #1664.
add mime type for WebVTT
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
Merge pull request #1666 from jronallo/webvtt-mime

add mime type for WebVTT
EPUB writer:  Don't add sourceURL to absolute URIs!

Closes #1669.

If there are further issues, please open a new, targeted issue on the
tracker.  Some notes on the further issues you gestured at:

Data URIs are indeed dereferenced, but why is this a problem?
(The function being used to fetch from URLs is used for many different
formats.  Preserving data URIs would make sense in EPUBs, but not
for e.g. PDF output.  And by dereferencing we can get a smaller,
more efficient EPUB, with the data stored as bytes in a file rather
than encoded in textual representation.)

"absolute uris are not recognized" -- I assume that is the problem
just fixed.  If not, please open a new issue.

"relative uris are resolved (wrongly) like file paths" -- can you
give an example?

`<base>` tag is ignored.  Yes. I didn't know about the base tag.  Could
you open a new issue just for this?
fix inDirectory to reset to the original directory in case an exception occurs