Truncated Variance Reduction: A Unified Approach to Bayesian Optimization and Level-Set Estimation Laboratory for Information and Inference Systems (LIONS), EPFL