Stochastic control and BSDEs with quadratic growth