validate case index domains

http://manage.dimagi.com/default.asp?120127

@dannyroberts 
assume that case.domain is always set by the time we reach this code (i know @dannyroberts changed this around recently to do fewer saves, and i think is now the case)