Black Box Submodular Maximization: Discrete and Continuous Settings