Merge pull request #60 from dimagi/related-cases

fix related cases display
catch up with master
remove redundant Meta classes and add __repr__ function to cases
workaround weird but rare error involving empty case_states (Case:62004)
Merge pull request #62 from dimagi/cz

workaround weird but rare error involving empty case_states (Case:62004)
Merge pull request #61 from dimagi/cleanup

remove redundant Meta classes and add __repr__ function to cases
Merge branch 'master' into case_multimedia

Conflicts:
	casexml/apps/case/models.py
	casexml/apps/case/tests/test_attachments.py
hotfix ota restore 500 with null user_id
Merge pull request #63 from dimagi/cz

hotfix ota restore 500 with null user_id
case multimedia handling wip stupid image separation handling, but works
deleting test_attachments, replaced by test_multimedia
fixing import race condition for test utils
handle error with invalid unicode strings (Case:60590)

A device log was submitted containing a string that causes an error when
trying to decode to UTF-8, an invalid diacritical mark (the string was
an error message for CommCare's inability to decode this string!).

Rather than fail here we choose Python's 'replace' error-handling
method, which seems to just keep the invalid diacritic in a way that it
still gets displayed by browsers, etc.
Merge pull request #46 from dimagi/nonascii

handle error with invalid unicode strings (Case:60590)
printout cleanup, documenting limitation of current iteration of attachment/image handling handling
Add time to case generator for OTA restore

This commit is to fix http://manage.dimagi.com/default.asp?62960.
Includes lots of fixing tests because of it as well.
Remove tons of stray spaces
Also use time in date string for V1 apps
refactor to use class-based model
Fix test failing due to datetime.now()