move commtrack-specific case stuff to commtrack cases
move some code to enable automatic wrapping of different case types
add class/doc_type check to test