fix bug in domain settings form when cloudcare setting not shown

also better error logging

http://manage.dimagi.com/default.asp?106712
Merge pull request #3070 from dimagi/cz

fix bug in domain settings form when cloudcare setting not shown