Tree approximation of scenario processes for multistage stochastic optimization: algorithms and fast implementations