Improve error handling on app copy to new domain.

*This is a follow-up to https://github.com/dimagi/commcare-hq/pull/3413.*  

Okay, @esoergel @czue, I fixed the issue with submodules, rebased onto master, and made the  changes we talked about: https://github.com/dimagi/commcare-hq/pull/3413.  Pushed this to a new branch b/c after the submodule issue and rebase, I figured that old PR would be too messy.

I realize you have had intermittent engagement with this fix, and it might be confusing by now.  If you wanna just on a Skype chat to finish this off, I can do that.  Or just wait until Tuesday.