Docx index generation

This code allows generation of an alphabetical index, with links to the indexed locations, from index markers in docx documents.

These are the potential weaknesses I'm aware of in this material:
1. I'm new to most of this technology - there are probably some things I've been naive about, and more complex cases I haven't considered.
2. Currently everything is defaulted: there is a single new checkbox in the docx input plugin which requests an index, and everything else defaults. There are many style choices which could be user configurable, including the title of the index, whether to divide it into sections by letter, and other things.
Currently the text of a link in the index is the content of the closest heading paragraph before the indexed location - that is, the closest Heading1, Heading2 or Heading3 paragraph - and the content of the links could also be more configurable.

If there are things you think this material needs before being suitable for inclusion in Calibre please let me know.