BOIS: Bayesian Optimization of Interconnected Systems