Rename id_manager to document_state.
Remove `document_root` member from `file_info`.

It isn't actually used any more.
Two stage initialisation of `file_info`.

Not much point now, but I'm going to try to create `file_info` before
processing the docinfo block. Unfortunately this means that the members
of `file_info` are no longer const, but I didn't want to add extra
complexity to keep that.

Added some assertions to make sure methods aren't called before the
docinfo is processed. Will probably have to relax some of them.
Make two stage file intialisation public.
Start file before parsing the docinfo block.

Had to fiddle around a little with `compatibility_version`, it would be
pretty trivial to set it from the start of the file, but for now I want
to make sure my assumption that it's never used in the docinfo block is
correct, otherwise I might accidentaly introduce a breaking change.
Make member_action and friends available in actions.

A fairly clumsy mechansim for calling member functions in parsers.
Rewrite source mode tracking.

This models the source mode in some of the output state classes.
A bit more complicated but it improves the behaviour of tagged source mode
so it now works for lists, tagged sections and allows source mode
changes to persist outside of tagged elements.