Add base support for cohorted group configurations

TNL-649

Introduced a new scheme field to user partitions that controls how a user gets assigned
to one of the partitions groups. The default scheme is random, but the next step will be
to introduce a new scheme that will assign the user based upon the cohort they belong to.
I'm confused why the tests for to_json moved here. Isn't the method defined in common/lib/xmodule/xmodule/partitions/partitions.py?