Algorithms, analysis and software for the global optimization of two-stage stochastic programs