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.
Looking at that code, I now see that we use it to allow us to dynamically set the branch based on the hostname.

Although, it seems like we could use a middleware instead, which would in turn call the context manager.