add media descriptors

http://manage.dimagi.com/default.asp?87176#783840

Don't merge until the questions raised in the case have been answered.
with descriptor set to None, the descriptor attribute in the XML won't get generated. If it's set to empty string then the descriptor attribute will be generated as descriptor=''