support empty names in auto slug generation

http://manage.dimagi.com/default.asp?141834
Merge pull request #4537 from dimagi/empty-codes

support empty names in auto slug generation