validate case index domains

http://manage.dimagi.com/default.asp?120127

@dannyroberts 
I tested it by running './manage.py submit_form' locally with a form that
creates a case and has an index. Here's a link to the form I was using:
http://pastebin.com/5xW2b6Pp


On Mon, Jun 30, 2014 at 12:35 PM, Simon Kelly <notifications@github.com>
wrote:

> In casexml/apps/case/xform.py:
>
> >                          ("Submitted index against an unknown case id: %s. "
> >                           "This is not allowed. Most likely your case "
> >                           "database is corrupt and you should restore your "
> >                           "phone directly from the server.") % index.referenced_id)
> > +                elif case.domain != referenced_case.domain:
>
> How did you test it? That must mean that there are multiple paths to
> creating a case.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/dimagi/casexml/pull/231/files#r14337937>.
>