Use duck-typing to support Django debug toolbar
Use duck-typing to support Django debug toolbar

- isinstance(rcache, RedisCache) was failing because Django debug toolbar wraps the redis cache in a proxy class.
- Log the error before swallowing it.
- Do not catch unrecoverable exceptions like KeyboardInterrupt and SystemExit.
puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq