Optimization properties of neural networks: landscape analysis and mean-field dynamics