Graph configuration

Adds the ability to configure graphs to be displayed in the case list. This feature is under a feature flag.
[spec](https://docs.google.com/a/dimagi.com/document/d/182jdLyld5SEaMsHD7w9kayklcQPn6KILwAvZUqRyqq0/edit#heading=h.q3wyha58n4s0) / [QA ticket](http://manage.dimagi.com/default.asp?144807)

This branch includes all commits from #4582 as well, so this should not be merged until then.
Also waiting on QA.