Added support for autogenerated labels on headings/captions

Added support for autogenerated labels on headings/captions, which can be enabled by turning on the $autogenerate.labels parameter. Useful if you don't want to handle labelling via CSS generated content and counters (which may not be viable for EPUB due to constraints in older ereaders).