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. 
Why is user_partition passed in? How does the caller now what to pass in, and why can't we instead just rely on the partition_id returned from get_partition_group_id_for_cohort?