Non-convex Optimization for Machine Learning: Design, Analysis, and Understanding