Move context_managers to base class, overridden by mixed.
Merge pull request #4309 from edx/nimisha/refactor_mixed_context_managers

Nimisha/refactor mixed context managers