fix case wrapping

loading settings.CASE_WRAPPER at module import caused a circular import.
Lesson: always use failhard=True with to_function to avoid masking
errors when things get changed.
Merge pull request #94 from dimagi/fix-case-wrapping

fix case wrapping