Use request cache for overriding branch settings.

https://openedx.atlassian.net/browse/LMS-11125

@cpennington Please review.
Theoretically, a thread-local would be sufficient for the `branch_setting` contextmanager.  However, rather than creating a new thread-local variable, I have the modulestores make use of the `request_cache` thread-local that has already been created and passed down.

Updating the Split Modulestore to use the new branch_setting implementation will be a separate PR.
This error case might be a reason not to use the `request_cache`. There's no need for this feature to depend on the `request_cache`, since you could just use a thread-local in this module, and doing so would make the `branch_setting` functionality available in more cases (and would mean you wouldn't need to change the tests).