Give toXHTML() the currently enabled directives.

This shared state is updated when DirectiveNodes are rendered.

This is messy, as it involves passing around mutable state. A better way
would be to have a visitor for rendering, which handles this in a
central place. When I get on to adding multiple output formats, that's
the approach I plan to take.