This is an NFC refactoring of the OptBisect class to split it into an optional pass gate interface used by LLVMContext and the Optional Pass Bisector (OptBisect) used for debugging of optional passes.
This refactoring is needed for D44464, which introduces setOptPassGate() method to allow implementations other than OptBisect.
Hmm.. can we avoid adding these headers and add forward declarations of all the necessary classes, please?
(the problem of layering has been just recently discussed on llvm-dev@)