Add test for AN rendering of a basic section.

Note that formencode is now required for testing in order to compare
xml documents.
In AN, Output speech type rather than just 'speech' or 'narrative'.

Instead of always outputting 'speech' or 'narrative', output the
actual type of the speech, which could be 'question' or 'scene', etc.

If the type has been set to something not allowed by AN, render
it as 'other'.
Close tags in the AN view of empty speeches.

Fixes #343 - AN view of empty sections has missing closing tag.
The HTML was missing a closing tag too, but was being much less
fussy about it.
Set speech type to 'speech' in a Speech derived from a recording.
Fix bug in AN import with 'from' and namespace.

child.find() will only find the <from> element if the XML document has
no namespace. As it's a direct descendant, we can use hasattr instead
which covers both scenarios.

Also add tests to fix #318 and test a number of previous changes.