Trajectory Ensembles and Machine Learning: From reinforcement learning for rare event sampling to training of neural network ensembles