Add support for courseware partitioning based on cohort.

@andy-armstrong @cahrens 

suspect i'm going to need to wire something into stevedore - @andy-armstrong ?

please take heed of the notes in the first commit message - there's a database migration needed. 
I feel like we already have a million test_partitions files (or we did until I made Andy rename his). What is actually being tested here? The cohort partition scheme? Can the filename and comments be more specific?