support "unwrapped" mode in CaseDbCache
support for unwrapped cases in reverse_indices
tmp commit with unwrapped indices
don't wrap cases in id-only cloudcare api mode

related to http://manage.dimagi.com/default.asp?149598

this reduces a form load time from about 12 seconds to 2 seconds locally
remove prints
change exception type
add tests for nowrap mode of case db cache
add comment clarifying semi-magical behavior
cater for initial_cases being a set
invert wrap check
make wrapper param of bulk_get_lite expect plain function
extract iter_cases function to utils
pass db to reverse_indices
return unwrapped index rather than view row
change wrapper param to wrap in bulk_get_lite
additional test cases for CaseAPI
Merge pull request #5072 from dimagi/cloudcare-speedup

don't wrap cases in id-only cloudcare api mode