Redirect ExpatError as ParserError.

When some c++ source file is badly encoded, an ExpatError causes
breathe to crash. This patch proposes to handle such an error just as
an IOError.
Further error handling for parsing errors

We change the parser module code to raise different exceptions for the
IOError and ExpatError where the latter is raised on unicode errors with
the file.

We change our index reading code in transforms.py to pick up on these
exceptions and report useful information in each case.

We propagate the line number through from the directive to make this
easier.

We also change the IndexHandler from taking the node and replacing it
internally so simply returning the replacement nodes and the
DoxygenTransform performs the replacement.
Move format_error helper to central place

And use it in the class & function directives as well as in the index
processing.
Refactor to render method in BaseDirective class

I don't like the idea of moving stuff to the base class for reuse
(composition/collaboration being generally better than inheritance) but
here it makes sense as so much of the data is coming from the Directive
base class itself.
Acknowledge Anthony Truchet's contribution

Thanks for helping with the Expat parser errors.
Merge branch 'expat-error'
Fix incorrect method name in calls
Add simple function to test domain cpp:func

Probably others in the examples but this does no harm and was useful for
testing.
Rename method for creating target handler

Makes it easier to grep for and discover and is generally more explicit.
Add framework for between target management

We pass the target handler to domain handlers as they are in a better
place to use it than the rest of the code.

Then we change the create_function_target method on the domain handler
to create, register and return the target node.

We need a target node in the final document so that it is properly
converted in the LaTeX output to a label that we can link to from
:cpp:func: Sphinx domain roles.

We try to add a bit more documentation as well.
Better target handling for functions

Re-jig the MemberTypeDef handling so that we deliberately and clearly
create a domain target and a doxygen refid target and output the
nodes into the final document.

This means that we no longer pass the ids to the paragraph node and
other nodes in the declaration as we only want to think in terms of the
targets and having the same ids in multiple places in the document
results in exceptions which we were previously casually ignoring.

We attempt to comment some of the functions in a clearer manner.
Improved target handling for class

We repeat what we did for the function handling:

- Deliberately and clearly output domain and doxygen refid targets
- Remove refid and domain_ids from other nodes
- Provide clearly documented methods for the domain and doxygen targets
Acknowledge Daniel Matz

Thanks for reporting the LaTeX linking error and forcing some evaluation
of that code :)

Also sync-ed up the credit.rst page as well.
Merge branch 'LaTeX'