Tabbed case detail

FB129673

Technical spec: https://confluence.dimagi.com/display/ccinternal/Tabbed+Case+Detail

Not-so-technical spec: https://docs.google.com/a/dimagi.com/document/d/1MiGqDJA59ZN9ycEWuq5ObVc9lhpVe0TgwCAfInhDzF8
K. I don't think it matters too much, but might be worth a note in the code that we're doing it JIT here, but could do it somewhere else if helpful for performance/persistence.