Replace entity references by their corresponding character references

I didn't manage to make the ElementTree XMLParser work with an enhanced
entities dict, so this is the workaround.
Improve the message on XML parsing errors
Handle the last element of a group only once

When the closing tag of an outline group was parsed, self.feed was
still set to the previous outline element's contents, and a new thread
was started for the same feed.

Clear self.feed after starting its thread to avoid this.