Detached pages from XML courses are set to appropriate descriptor class ...

...(LMS-2094)

Add tests

Fixes an issue were detached items from XML courses were being turned into HtmlDescriptors instead of their appropriate category descriptor.

@cpennington , in the course of rebasing, there seem to be other changes to xml.py. Does this look okay?
@wedaly 
@singingwolfboy