fix infinite recursion on case hierarchy generation + test
move hq dependent imports inline (boooo)
Merge pull request #236 from dimagi/infinite-hierarchy

fix infinite recursion on case hierarchy generation + test