Course Materials shows children in draft mode

@sefk or @jbau please

* Major refactoring of get_course_materials and related functions.
** Exposure of way more raw group and item information, which can be
   used later to refactor the templates, and then simplify
   get_course_materials more.
* Extension of draft mode list item templates with a bit declaring them
  to be a child of item such-and-such.
(closes #1459)

This is a pretty major refactoring and I'm happy to iterate on it. I've tested everything I can think of but may have missed something. @jinpa tested as well and said looked ok. Unit tests pass, but of course I'd be happier if we had more of them.

If this lands I still need to open tickets for solving the problem where item indexes should be calculated differently for draft mode so that children can stay with their parents. Then we can indent them and get rid of the hideous text.