MediaWiki reader: Accept image links in more languages

In some of the Wikipedia versions the local version of 'File' is used (for example 'Archivo' in Spanish)
Remove Makefile.
PDF:  Changes to error reporting, to handle non-UTF8 error output.
beamer template:  changes for better unicode handling.

Ported from LaTeX template.  Thanks to KarolS for the patch.
Markdown reader: Fixed regression on line breaks in strict mode.

Closes #1203.
Fixed typo in README
Parsing:  Make F an instance of Applicative.  Closes #1138.
Merge pull request #1068 from jaimeMF/mw-images-langs

MediaWiki reader: Accept image links in more languages
RTF writer:  Fixed tables cells containing paragraphs.

This moves \intbl after \pard.
LaTeX reader:  Better handling of "table" environment.

Positioning options no longer rendered verbatim.
Partially addresses #1204.
API changes to HasReaderOptions, HasHeaderMap, HasIdentifierList.

Previously these were typeclasses of monads.  They've been changed
to be typeclasses of states.  This ismplifies the instance definitions
and provides more flexibility.

This is an API change!  However, it should be backwards compatible
unless you're defining instances of HasReaderOptions, HasHeaderMap,
or HasIdentifierList.  The old getOption function should work as
before (albeit with a more general type).

The function askReaderOption has been removed.
extractReaderOptions has been added.
getOption has been given a default definition.

In HasHeaderMap, extractHeaderMap and updateHeaderMap have been added.
Default definitions have been given for getHeaderMap, putHeaderMap,
and modifyHeaderMap.

In HasIdentifierList, extractIdentifierList and updateIdentifierList
have been added.  Default definitions have been given for
getIdentifierList, putIdentifierList, and modifyIdentifierList.

The ultimate goal here is to allow different parsers to use their
own, tailored parser states (instead of ParserState) while still
using shared functions.
Whitespace change, and note:

Contrary to the previous commit message, there was no API
change, since Text.Pandoc.Parsing is not an exposed module.
Parsing:  Added HasMacros, simplified other typeclasses.

Removed updateHeaderMap, setHeaderMap, getHeaderMap,
updateIdentifierList, setIdentifierList, getIdentifierList.
LaTeX reader:  Added LPState.

Plan is to use this instead of ParserState in LP.
Revert "LaTeX reader:  Added LPState."

This reverts commit 82ddec698e782fef83dcd1b1fba79cd3b698c717.
Parsing:  Added stateCaption.

This is primarily for use in the LaTeX reader, so far.
LaTeX reader:  Better handling of figure and table with caption.

We now look for a \caption inside the environment; if one is
found, it is attached to the graphic or tabular found there.

Closes #1204.
Markdown writer:  Use longer backtick fences if needed.

If the content contains a backtick fence and there are
attributes, make sure longer fences are used to delimit the code.

Note:  This works well in pandoc, but github markdown is more
limited, and will interpret the first string of three or more
backticks as ending the code block.

Closes #1206.
Make --toc-depth work well with books in latex/pdf output.

Closes #1210.
Bugfix for #1175 and convert textile reader to use builder.

The reader did not correctly parse inline markup. The behavoir is now as follows.

(a) The markup must start at the start of a line, be inside previous
inline markup or be preceeded by whitespace.
(b) The markup can not span across paragraphs (delimited by \n\n)
(c) The markup can not be followed by a alphanumeric character.
(d) Square brackets can be placed around the markup to avoid having
to have white space before it.

In order to make these changes it was either necessary to convert the parser to return a list of inlines or to convert the whole reader to use the builder. The latter approach whilst more work makes a bit more sense as it becomes easy to arbitarily append and prepend elements without changing the type.

Tests are accordingly updated in a later commit to reflect the different normalisation behavoir specified by the builder monoid.