Combined stochastic control and optimal stopping, and application to numerical approximation of combined stochastic and impulse control