Improve handling of DOM hidden content

Fixes #383 + integration tests for ``domComplexity`` and ``domHiddenContent`` modules.