Course Materials shows children in draft mode

* 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)