Adding handling for listitem with multiple child elements including figure elements.

Also fixed logic for glossdef with multiple paras.