Make overriding branch settings thread-safe LMS-11125

https://openedx.atlassian.net/browse/LMS-11125

*Note*: As described in the ticket, this is an actual issue in Studio. When exporting a course, we temporarily set the branch_setting to `published_only`. This could potentially collide with other requests that are active at the same time (they would not see Draft content).

@cpennington @dmitchell @sarina  Please review.

Updating the Split Modulestore to use the new branch_setting implementation is a separate PR: https://github.com/edx/edx-platform/pull/4514
@cpennington In speaking with Don, he reminded me that mixed.py needs the `course_id` parameter since we need to know which underlying modulestore to delegate to.  And since we want all modulestores to have consistent APIs, the underlying stores would also need to have this parameter.  

We couldn't conceive a good scenario where we would have the need for an underlying store to have different branch_settings for different courses simultaneously (on the same thread).  So I didn't make use of the `course_id` in the Mixin's implementation of branch_setting.