Docx reader: Add test

Test auto ident header anchors with pandoc-generated pandoc.
Docx Reader: Change state handling.

We don't need `updateDState` -- the built-in `modify` works just
fine. And we redefine `withDState` to use modify.
Docx Reader: Fix hdr auto-id when already auto-id.

If header anchors (bookmarks in a header paragraph) already have an
auto-id, which will happen if they're generated by pandoc, we don't want
to rename it twice, and thus end up with an unnecessary number at the
end. So we add a state value to check if we're in a header. If we are,
we don't rename the bookmark -- wait until we rename it in our header
handling.
Merge pull request #1430 from jkr/anchor-fix-2

Fix auto identified headers when already auto-id'ed